cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [16/50] js commit: Update lib/webos/plugin/webos/network.js
Date Tue, 12 Feb 2013 19:33:07 GMT
Update lib/webos/plugin/webos/network.js

handle not existing fields of connection manager service response (provided by morphis)


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/67f1c6ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/67f1c6ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/67f1c6ea

Branch: refs/heads/symbolmapping
Commit: 67f1c6ea8facf990590eb930a14a64e88eee5fa2
Parents: 41c63c9
Author: ghtomcat <mleut@yahoo.com>
Authored: Fri Feb 8 11:27:41 2013 +0100
Committer: hermwong <herm.wong@gmail.com>
Committed: Mon Feb 11 14:53:02 2013 -0800

----------------------------------------------------------------------
 lib/webos/plugin/webos/network.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/67f1c6ea/lib/webos/plugin/webos/network.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/network.js b/lib/webos/plugin/webos/network.js
index 3f8f8f8..504841f 100644
--- a/lib/webos/plugin/webos/network.js
+++ b/lib/webos/plugin/webos/network.js
@@ -41,8 +41,8 @@ module.exports = {
 
                 var info={};
                 if (!result.isInternetConnectionAvailable) { info.type=Connection.NONE; }
-                if (result.wifi.onInternet) { info.type=Connection.WIFI; }
-                if (result.wan.state==="connected") { info.type=Connection.CELL_2G; }
+                if (result.wifi && result.wifi.onInternet) { info.type=Connection.WIFI;
}
+                if (result.wan && result.wan.state==="connected") { info.type=Connection.CELL_2G;
}
 
                 successCallback(info.type);
             },


Mime
View raw message