Closed TravelingTice closed 5 months ago
Latest commit: a87044a859bebf1b4abc81db8f52e0e66183c61a
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The change involves a refinement in the logic for handling query parameters within a specific function. This adjustment shifts the focus from evaluating truthiness to explicitly checking for non-null values, thereby refining the control flow based on more precise value checks. This subtle yet significant change ensures a more accurate handling of query parameters and introduces a new functionality related to allowing false values in sveltekit-search-params
.
File Path | Change Summary |
---|---|
src/lib/sveltekit-search-params |
Modified condition to check for non-null instead of truthy values in query parameter handling. Introduces fix for allowing false values in sveltekit-search-params . |
🐰✨
In the realm of code, where logic intertwines,
A rabbit hopped through, refining the lines.
From truthy to non-null, the checks did evolve,
Ensuring query params, mysteries could solve.
🌟📜
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | a87044a859bebf1b4abc81db8f52e0e66183c61a |
Latest deploy log | https://app.netlify.com/sites/sveltekit-search-params/deploys/65e5ef30ce2df700098122aa |
Hey @paoloricciuti 👋 Just following up here, I processed your suggestion a couple days ago, so should be all good now 🚀
Hey @paoloricciuti 👋 Just following up here, I processed your suggestion a couple days ago, so should be all good now 🚀
Ugh sorry...thanks for pinging me
Hi @paoloricciuti 👋
I found a small bug when using the package with a store value that was a boolean, and by default
false
. I had this mount on a form submit after which a checkbox component would be mounted, mapped to a queryParam store that was of type boolean and by default false. It caused this weird infinite redirect loop, here is a little video of it:https://github.com/paoloricciuti/sveltekit-search-params/assets/34274090/042fc7a7-e133-4633-9798-4e817b78dad0
Was able to trace it down to an evaluation of
$override
which wouldn't work forfalse
values. Changed it to do a comparison ofnull
which should be a bit safer, as the type of this isT | null
, so I assume that we want this path to run only when non-null.Summary by CodeRabbit