-
Notifications
You must be signed in to change notification settings - Fork 59
fix(parseQuery): use object with null prototype #286
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
==========================================
+ Coverage 95.27% 97.60% +2.33%
==========================================
Files 7 7
Lines 867 711 -156
Branches 187 240 +53
==========================================
- Hits 826 694 -132
+ Misses 41 17 -24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We need to use an object with null proto. |
hasOwnProperty for key existence check
@pi0 This object will be returned for the user to use, and they may expect it to behave like a normal object with prototype functions (e.g., calling If this object is only for internal use, that's fine since we control how it's used. But if it's exposed to users, are you still okay with that? 🤔 |
|
It wouldn't break user expectations, and using null proto objects is pretty standard way to help this issue. |
|
Thanks 🙏🏼 |
resolves #282