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

warning: The "typeof" operator will never evaluate to "null" #358

Closed
ngbinh opened this issue Aug 31, 2020 · 2 comments
Closed

warning: The "typeof" operator will never evaluate to "null" #358

ngbinh opened this issue Aug 31, 2020 · 2 comments

Comments

@ngbinh
Copy link

ngbinh commented Aug 31, 2020

I updated esbuild to the 0.6.28 from 0.6.23 and it breaks my build on project that depends on https://www.npmjs.com/package/tabulator-tables with a warning:

 npx esbuild doctable-fastopt.js --bundle --strict --platform=browser --target=es2015 --outfile=doctable-fastopt-bundle.js --log-level=info --define:process.env.NODE_ENV="development" --define:process.cwd=String --define:process.platform=String --define:process=String --external:process
node_modules/tabulator-tables/dist/js/tabulator.js:13581:76: warning: The "typeof" operator will never evaluate to "null"
                headers[i] = typeof col.value == "undefined" || typeof col.value == "null" ? "" : col.value;
                                                                                    ~~~~~~

@evanw
Copy link
Owner

evanw commented Aug 31, 2020

This is just a warning. Nothing is broken. Warnings just inform you about things but don't cause the build to fail. The build still succeeds as long as there are no errors.

This particular warning is warning you about nonsensical code in that library. If you don't want to see that warning, you could either reach out to the author of that package to tell them to fix their nonsensical code, or just pass --log-level=error to esbuild to disable the logging of warnings.

@ngbinh
Copy link
Author

ngbinh commented Aug 31, 2020

Yes. I think you are right. Close for now

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