mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-18 21:52:48 +08:00
Merge remote-tracking branch 'rodms/fxos2-fix'
This commit is contained in:
commit
6e6245698e
@ -34,8 +34,16 @@ module.exports = {
|
||||
|
||||
getConnectionInfo: function(successCallback, errorCallback) {
|
||||
var connection = origConnection || navigator.mozConnection,
|
||||
connectionType = Connection.UNKNOWN,
|
||||
bandwidth = connection.bandwidth,
|
||||
connectionType = Connection.UNKNOWN;
|
||||
|
||||
if (!connection) {
|
||||
setTimeout(function() {
|
||||
successCallback(connectionType);
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
var bandwidth = connection.bandwidth,
|
||||
metered = connection.metered,
|
||||
type = connection.type;
|
||||
|
||||
@ -86,4 +94,4 @@ module.exports = {
|
||||
}
|
||||
};
|
||||
|
||||
require("cordova/exec/proxy").add("NetworkStatus", module.exports);
|
||||
require("cordova/exec/proxy").add("NetworkStatus", module.exports);
|
||||
|
Loading…
Reference in New Issue
Block a user