luigiplr/node-hotspot

getInternetConnectedAdaptor() explodes when there is no connection

Closed this issue · 0 comments

https://github.com/tobeorla/node-hotspot/blob/master/build/utils/windows.js#L166
When there is no connection, networkData is an empty array.
node-hotspot attempts to call _this.getLocalIp which throws an exception, as is trying to run (Get-NetAdapter -ifIndex "undefined" | Get-NetIPAddress).IPv4Address in powershell