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
scratch-blocks/core/xml.js
Line 645 in caa389d
The result of typeof should be a string, which means it won't equals to undefined. (Even typeof undefined is 'undefined')
typeof
undefined
typeof undefined
'undefined'
ESLint will report
error Invalid typeof comparison value valid-typeof
MDN shows that if the attribute doesn't exist, getAttribute will return null.
getAttribute
Should it be modified to if (typeof type === 'undefined' || type === null) or just if (type === null)?
if (typeof type === 'undefined' || type === null)
if (type === null)
The text was updated successfully, but these errors were encountered:
@alexcui03, this statement should be if (typeof type == 'undefined' || type == null) for clarification.
if (typeof type == 'undefined' || type == null)
Sorry, something went wrong.
No branches or pull requests
scratch-blocks/core/xml.js
Line 645 in caa389d
The result of
typeof
should be a string, which means it won't equals toundefined
. (Eventypeof undefined
is'undefined'
)ESLint will report
MDN shows that if the attribute doesn't exist,
getAttribute
will return null.Should it be modified to
if (typeof type === 'undefined' || type === null)
or justif (type === null)
?The text was updated successfully, but these errors were encountered: