mirror of https://github.com/gorhill/uBlock.git
Identify Map correctly (#1972)
Using Google bigquery I found that your code was comparing the result of `typeof` with a variable named `undefined`. As typeof returns a string it should compare to a string with the content `'undefined'`
This commit is contained in:
parent
cc5498235c
commit
b8dc685d01
|
@ -32,7 +32,7 @@
|
||||||
var showdomButton = uDom.nodeFromId('showdom');
|
var showdomButton = uDom.nodeFromId('showdom');
|
||||||
|
|
||||||
// Don't bother if the browser is not modern enough.
|
// Don't bother if the browser is not modern enough.
|
||||||
if ( typeof Map === undefined || Map.polyfill || typeof WeakMap === undefined ) {
|
if ( typeof Map === 'undefined' || Map.polyfill || typeof WeakMap === 'undefined' ) {
|
||||||
showdomButton.classList.add('disabled');
|
showdomButton.classList.add('disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue