From f6312a1b98d10d0e28b51aa7bca27269616cdf6b Mon Sep 17 00:00:00 2001 From: Mathias Rangel Wulff Date: Sat, 10 Sep 2016 23:32:10 +0200 Subject: [PATCH] Correct check for undefined variable (#2693) The code was comparing the result of `typeof` with a variable named `undefined`. As typeof returns a string it should compare to `'undefined'` --- src/RestWrite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestWrite.js b/src/RestWrite.js index 05c4bf9e..6443a67e 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -262,7 +262,7 @@ RestWrite.prototype.findUsersWithAuthData = function(authData) { memo.push(query); return memo; }, []).filter((q) => { - return typeof q !== undefined; + return typeof q !== 'undefined'; }); let findPromise = Promise.resolve([]);