Merge remote-tracking branch 'rodms/fxos2-fix'

This commit is contained in:
Piotr Zalewa 2014-09-15 10:15:10 +02:00
commit 6e6245698e

View File

@ -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;