Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix formatting errors when restoring platform scripts
- Loading branch information
Showing
2 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
function getWiFiIPAddress(success, failure) { | ||
|
||
var winNetConn = Windows.Networking.Connectivity; | ||
var networkInfo = winNetConn.NetworkInformation; | ||
|
||
var hostnames = networkInfo.getHostNames(); | ||
|
||
var addresses = []; | ||
|
||
for (const hostname of hostnames) { | ||
if (hostname.ipInformation !== null && (hostname.ipInformation.networkAdapter.ianaInterfaceType == 71 || hostname.ipInformation.networkAdapter.ianaInterfaceType == 6)) { | ||
addresses.push(hostname.displayName); | ||
} | ||
|
||
var winNetConn = Windows.Networking.Connectivity; | ||
var networkInfo = winNetConn.NetworkInformation; | ||
|
||
var hostnames = networkInfo.getHostNames(); | ||
|
||
var addresses = []; | ||
|
||
for (const hostname of hostnames) { | ||
if (hostname.ipInformation !== null && (hostname.ipInformation.networkAdapter.ianaInterfaceType == 71 || hostname.ipInformation.networkAdapter.ianaInterfaceType == 6)) { | ||
addresses.push(hostname.displayName); | ||
} | ||
|
||
if (addresses.length) { | ||
success(addresses[0]); | ||
} else { | ||
failure(); | ||
} | ||
|
||
} | ||
|
||
|
||
module.exports = { | ||
getWiFiIPAddress: getWiFiIPAddress | ||
}; | ||
|
||
|
||
require('cordova/exec/proxy').add('networkinterface', module.exports); | ||
|
||
if (addresses.length) { | ||
success(addresses[0]); | ||
} else { | ||
failure(); | ||
} | ||
|
||
} | ||
|
||
|
||
module.exports = { | ||
getWiFiIPAddress: getWiFiIPAddress | ||
}; | ||
|
||
|
||
require('cordova/exec/proxy').add('networkinterface', module.exports); |