Skip to content

Fix typeof check for location variable#683

Open
disconnect3d wants to merge 1 commit intornadigital:masterfrom
disconnect3d:patch-1
Open

Fix typeof check for location variable#683
disconnect3d wants to merge 1 commit intornadigital:masterfrom
disconnect3d:patch-1

Conversation

@disconnect3d
Copy link

The typeof operator returns a string, so a comparison of its result should always be performed against a string, not a constant like undefined.

In other words: typeof sth != undefined should be typeod sth != "undefined" (or even use !==, but I'll leave it as != in here).

The `typeof` operator returns a string, so a comparison of its result should always be performed against a string, not a constant like `undefined`.

In other words: `typeof sth != undefined` should be `typeod sth != "undefined"` (or even use !==, but I'll leave it as `!=` in here).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant