Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sources such as [D. Crockford][^1] and [MDN][^2] both advise that only triple equals operator should be used when programming in JavaScript and double equals operator be ignored altogether. [^1]: https://bytearcher.com/articles/douglas-crockford-javascript-good-parts-book-review/ [^2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
- Loading branch information
a013a28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that this was doing a nullish comparison and that the triple equals would mean that
undefined
would not be accounted for when doing these initial comparisons, which is not what we want because it should be accounted for here.