Skip to content
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

Replace typeof image !== 'undefined' && image !== null with !!image #21

Closed
davidzwa opened this issue May 2, 2022 · 3 comments
Closed
Assignees
Milestone

Comments

@davidzwa
Copy link
Collaborator

davidzwa commented May 2, 2022

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

@mkevenaar mkevenaar added this to the 0.1.0 milestone May 2, 2022
@davidzwa
Copy link
Collaborator Author

davidzwa commented May 2, 2022

Might as well reduce welcome::execute with some nulldef util for more simplicity.

davidzwa added a commit to davidzwa/NickNelson that referenced this issue May 3, 2022
mkevenaar added a commit that referenced this issue May 3, 2022
(#21) apply decent nulldef or whitespace checks
@davidzwa davidzwa closed this as completed May 3, 2022
@davidzwa
Copy link
Collaborator Author

davidzwa commented May 3, 2022

Closed in #27

@mkevenaar
Copy link
Owner

🎉 This issue has been resolved in version 0.1.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants