-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unreachable code in jquery_event_deprecation
#17550
Comments
I'll try to fix this! |
Here's a PR that fixes this: #17555 The first iteration of this did not work as expected, so I played around a bit, to see what's happening, and found something weird. Given the following code excerpt:
which is fine, so
Not only did it not remove the Note that it does work when Anyone can explain this, other than this being a bug in |
We should probably report over there I think... |
you missed the |
Ah, indeed! So it's semantically not wrong, but could have still figured out this to be always false, and thus removed the if block... |
Right. It’s still a bug IMHO. |
Hm, probably Just speculating, but it would explain why changing the order makes a difference: when |
@simonihmig yep, that is what I would expect to be the reason too. it could remove the |
I agree that the import could have side effects but in any case it knows that the body of the if could never be executed and it should therefore be stripped.... |
In Firefox with Ember v3.7.0 I'm seeing the following warning on the console in production:
It looks like the minifier is not doing its thing here. We should try to find a way to restructure that code so that
terser
is dropping the dead code correctly.The text was updated successfully, but these errors were encountered: