Fix some typing problems
- Using '' as default value is confusing when the function expects a number as parameter - `validateRequiredValue` can take a number as well as a string as first parameter
This commit is contained in:
@@ -190,7 +190,7 @@ export const getIpList = (interfaces) => Object.values(interfaces)
|
||||
.reduce((acc, curr) => acc.concat(curr.ip_addresses), [])
|
||||
.sort();
|
||||
|
||||
export const getDnsAddress = (ip, port = '') => {
|
||||
export const getDnsAddress = (ip, port = 0) => {
|
||||
const isStandardDnsPort = port === STANDARD_DNS_PORT;
|
||||
let address = ip;
|
||||
|
||||
@@ -205,7 +205,7 @@ export const getDnsAddress = (ip, port = '') => {
|
||||
return address;
|
||||
};
|
||||
|
||||
export const getWebAddress = (ip, port = '') => {
|
||||
export const getWebAddress = (ip, port = 0) => {
|
||||
const isStandardWebPort = port === STANDARD_WEB_PORT;
|
||||
let address = `http://${ip}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user