-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: use strict equal #3079
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
Conversation
Replace loose equality (==) with strict equality (===) for isListening boolean comparison on line 253. This follows JavaScript best practices and prevents potential type coercion issues. The change is in the onTrigger callback within createSetupStore function, which handles debugger events during development mode.
✅ Deploy Preview for pinia-official canceled.
|
WalkthroughA single operator change improving code quality: loose equality ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
posva
left a comment
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.
Thanks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3 #3079 +/- ##
=======================================
Coverage 90.90% 90.90%
=======================================
Files 19 19
Lines 1683 1683
Branches 237 237
=======================================
Hits 1530 1530
Misses 151 151
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
This PR fixes a code quality issue where loose equality (
==) is used instead of strict equality (===) for a boolean comparison instore.ts.Changes
packages/pinia/src/store.tsfromisListening == falsetoisListening === falseMotivation
Using strict equality (
===) instead of loose equality (==) is a JavaScript best practice that:Context
The change is in the
onTriggercallback within thecreateSetupStorefunction, which handles debugger events during development mode. TheisListeningvariable is declared asbooleantype.Testing
✅ All existing tests pass:
Impact
Fixes #3078
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.