From 978c145180289c184fc565fb9deb9b29b3bc7ca4 Mon Sep 17 00:00:00 2001 From: Mathias Rangel Wulff Date: Mon, 12 Sep 2016 10:23:31 +0200 Subject: [PATCH] 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'` --- src/js/user-rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/user-rules.js b/src/js/user-rules.js index aea85de..128c210 100644 --- a/src/js/user-rules.js +++ b/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' ) {