Skip to content

Commit f6312a1

Browse files
mathiasrwflovilmart
authored andcommitted
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'`
1 parent cab69b4 commit f6312a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestWrite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ RestWrite.prototype.findUsersWithAuthData = function(authData) {
262262
memo.push(query);
263263
return memo;
264264
}, []).filter((q) => {
265-
return typeof q !== undefined;
265+
return typeof q !== 'undefined';
266266
});
267267

268268
let findPromise = Promise.resolve([]);

0 commit comments

Comments
 (0)