mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-19 05:52:49 +08:00
Fix network information type exception on fxos 2
This commit is contained in:
parent
a810b7db99
commit
ec96704786
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user