Skip to content

Commit

Permalink
Fix formatting errors when restoring platform scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
salbahra committed Dec 2, 2017
1 parent 3cabc25 commit a708c8d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/browser/networkinterfaceProxy.js
Expand Up @@ -39,4 +39,4 @@ module.exports = {
getWiFiIPAddress: getWiFiIPAddress
};

require( "cordova/exec/proxy" ).add( "networkinterface", module.exports );
require( "cordova/exec/proxy" ).add( "networkinterface", module.exports );
54 changes: 27 additions & 27 deletions src/windows/networkinterfaceProxy.js
@@ -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);

0 comments on commit a708c8d

Please sign in to comment.