-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Throw error on circular references #367
Comments
Related to #31; seems like maybe we need the same treatment for stringify. |
What about a "maxDepth" option ? |
Just to know. What is the targeted browser compatibility of qs ? I would have a solution working with JavaScript "Map" ... but it's not available in IE10 <= |
@Poyoman39 its much older than that, I’m afraid. Map can be shimmed (and should always be), but qs can’t rely on that being the case. However, we could build a fake Map with an array if WeakMap/Map isn’t available |
Ok i did a throw / Map solution (second PR) . I wanted to use Map for performance reasons. But maybe it's a bit of overOptiomisation ? Since querystrings does not contains that much keys ??? It would be possible to do it with a simple array ... les performant, but without requiring a Shim ? What do you think ? |
Ok last PR, this time with array way :D #395 We have some choice for this one issue :D |
Ok please stop creating extra PRs tho - each PR is a permanent ref on the repo, so how i have 3 PRs to keep in sync :-) |
Ok sry for this ^^ Do you want i close some of them ? |
No, please leave them all open - whatever solution we go with, I’ll update all three PRs to have it as part of landing. |
Currently the library does not throw error when parsing circual references.
Example:
The text was updated successfully, but these errors were encountered: