-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorrect typeof checks in a few places causing unintended behaviour #5483
Comments
ESLint has a rule to check for invalid uses of |
@jokeyrhyme we have eslint and we use I'll fix the typeof problems and release shortly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
moment's code include incorrect uses of
typeof
that are causing theSymbol
support check to fail in Node.js 0.10.x, and maybe causing issues with the use of__dirname
Note that
typeof
returns a string, and the above checks are comparing the result oftypeof
against theundefined
value, not the"undefined"
stringTo Reproduce
Steps to reproduce the behavior:
require('moment')
using a version of Node.js that doesn't implementSymbol
Expected behavior
This should load just fine without any exceptions or errors
Screenshots
n/a
The text was updated successfully, but these errors were encountered: