Fix problem in version detection via js variables (#2033)

* Fix version detection in js variables (webextension)

* Fix version detection in js variables (NPM)
main
Camille Barneaud 7 years ago committed by Elbert Alias
parent d44fe72222
commit b94acd1961

@ -246,7 +246,7 @@ class Driver {
return parent && parent.hasOwnProperty(property) ? parent[property] : null;
}, browser.window);
value = typeof value === 'string' ? value : !!value;
value = typeof value === 'string' || typeof value === 'number' ? value : !!value;
if ( value ) {
js[appName][chain][index] = value;

@ -53,7 +53,7 @@
}
}
return typeof value === 'string' ? value : !!value;
return typeof value === 'string' || typeof value === 'number' ? value : !!value;
} catch(e) {
// Fail quietly
}

Loading…
Cancel
Save