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; return parent && parent.hasOwnProperty(property) ? parent[property] : null;
}, browser.window); }, browser.window);
value = typeof value === 'string' ? value : !!value; value = typeof value === 'string' || typeof value === 'number' ? value : !!value;
if ( value ) { if ( value ) {
js[appName][chain][index] = 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) { } catch(e) {
// Fail quietly // Fail quietly
} }

Loading…
Cancel
Save