We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In this line of code the typeof result could never return undefined so the condition will always be false.
typeof result
undefined
false
if (typeof result === undefined) { return result; }
The correct way to check if a value is undefined could be like typeof result === 'undefined' or result === 'undefined'.
typeof result === 'undefined'
result === 'undefined'
BTW, A strict ESLint check is requested for an open source JavaScript project. The Airbnb one is a good choice.
The text was updated successfully, but these errors were encountered:
Thank you for your suggestion. This is indeed a bug. I will fix it later. After being free, I will perfect eslint detection and unit testing
Sorry, something went wrong.
It has been fixed. This uses result === void 0 because undefined itself may be modified。
No branches or pull requests
In this line of code the
typeof result
could never returnundefined
so the condition will always befalse
.The correct way to check if a value is
undefined
could be liketypeof result === 'undefined'
orresult === 'undefined'
.BTW, A strict ESLint check is requested for an open source JavaScript project. The Airbnb one is a good choice.
The text was updated successfully, but these errors were encountered: