Replace typeof image !== 'undefined' && image !== null
with !!image
#21
Milestone
typeof image !== 'undefined' && image !== null
with !!image
#21
Null/undefined checks should not use undefined string equality. This is a thing of the past.
Expected Behavior
Replaced code will cover more than just undefined or null. It will also mark 0, '', as false. The new code does not tackle [], NaN (I think) as falsy.
Current Behavior
Unchanged
Possible Solution
Replaced code will cover more than just undefined or null.
Steps to Reproduce (for bugs)
.
Context
Developer knowledge
The text was updated successfully, but these errors were encountered: