-
Notifications
You must be signed in to change notification settings - Fork 289
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
[FIX] Add warning back in #4880
Conversation
Would be a good idea maybe to add a Cypress tests for this @jpelay? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!! This was probably an oversight by us.
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Np! Do we want to add an issue to make a test so we don't forget? |
Yeah, Im on it! |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Fixes #2394 (finally!!) by checking if declared variables are actually used, also fixes #4884 that was introduced here. Depends-On: #4880 **How to test** I have added a test for the exception. To see it in action on the front-end, run code that defines but not uses a variable, and observe you get a warning but the code still runs: <img width="1382" alt="image" src="https://github.com/hedyorg/hedy/assets/1003685/bb00c145-8d81-4e86-8ea1-316b0ae955c6"> Note that this PR needs #4880 to show the warning in the front-end!
Fixes #4869
As far as I can see, @ToniSkulj removed this warning in #4320, I suspect by accident, but if not, let me know :)
See:
How to test
Observe that code with a space at the start runs but also throws an error: