Browse Source

Correct check for undefined variable

The code was comparing the result of `typeof` with a variable named `undefined`

As typeof returns a string it should compare to `'undefined'`
pull/2/head
Mathias Rangel Wulff 8 years ago
committed by GitHub
parent
commit
978c145180
  1. 2
      src/js/user-rules.js

2
src/js/user-rules.js

@ -126,7 +126,7 @@ var fromNoScript = function(content) {
noscript === null ||
typeof noscript !== 'object' ||
typeof noscript.prefs !== 'object' ||
typeof noscript.prefs.clearClick === undefined ||
typeof noscript.prefs.clearClick === 'undefined' ||
typeof noscript.whitelist !== 'string' ||
typeof noscript.V !== 'string'
) {

Loading…
Cancel
Save