-
Notifications
You must be signed in to change notification settings - Fork 33
animint.js: remove unnecessary hasOwnProperty selector checks #284
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
base: master
Are you sure you want to change the base?
Conversation
|
did you read the contribution guidelines? https://github.com/animint/animint2?tab=contributing-ov-file#avoiddeclare-ai-code-generation |
|
yes, i have read the contribution guidelines and agree to follow the same. I have removed the if check . please let me know about any further changes |
|
hi, @tdhock , just saw the tests have failed, do you have any suggestion on how to fix the issue or any technical documentation i need to go thorough to fix this issue. |
|
thanks! it is normal for the gh pages tests to fail from forks https://github.com/animint/animint2?tab=contributing-ov-file#prs-from-forks-versus-branches-in-this-repo can you please add your name as a contributor to DESCRIPTION, and increase version number there, and add a NEWS item? |
|
done adding , PR ready for review , please let me know about any further changes. |
|
Ready for review |
|
Hi @tdhock , pr ready for review. |
|
there are a lot of failing tests. |
|
Thanks for the feedback ,I'll start debugging for the failing tests. |
Removed all Selectors.hasOwnProperty checks and added proper defensive checks to prevent undefined selector access errors. Changes: - Line ~1570: Added if-check before accessing selector duration - Line ~1866: Added if-check for transition duration - Line ~2084: Added early return if selector doesn't exist - Line ~2534-2536: Removed hasOwnProperty for clickSelects and legend checks All hasOwnProperty checks removed while maintaining safety through defensive programming. Fixes animint#278 Co-authored-by: Harshit Gangwar <bethebest100times@gmail.com>
|
Sir @tdhock
Sir please review and give your feedback , Thanks . |
Fixes #278.
This PR removes unnecessary
hasOwnPropertychecks when accessingSelectors in animint.js.
I verified the current source and fixed all existing occurrences
(~1570, ~1866, ~2087). Two additional line references mentioned in
the issue (~2766, ~2797) do not exist in the current animint.js
source, which ends at ~2754 lines.