Open MasterOdin opened 1 year ago
PR fixes a bug reported in https://github.com/http-party/node-portfinder/pull/120#issuecomment-1502633024, where the current indexOf check will only succeed if options.host was already in exports._defaultHosts, as opposed to the desired behavior of appending it if it's not in the array.
indexOf
options.host
exports._defaultHosts
I've also cleaned up the nested conditional to just be one level as the nesting was not necessary.
PR fixes a bug reported in https://github.com/http-party/node-portfinder/pull/120#issuecomment-1502633024, where the current
indexOf
check will only succeed ifoptions.host
was already inexports._defaultHosts
, as opposed to the desired behavior of appending it if it's not in the array.I've also cleaned up the nested conditional to just be one level as the nesting was not necessary.