-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] Ability to set a query param to a string of "null" when default value is null #13816
Conversation
169e2df
to
7c3150b
Compare
7c3150b
to
c7bc19c
Compare
Wondering if there is anything I could do to get this merged in? |
`"[1]"` gets stringified in a subsequent call to `serializeQueryParam`, resulting in the serialized param being `""[1]""` instead of `"[1]"`. This fixes emberjs#13591 and is similar to emberjs#13816.
☔ The latest upstream changes (presumably #14415) made this pull request unmergeable. Please resolve the merge conflicts. |
Is it the desirable behavior ? I wondering, if you really want a null value you need to just remove the parameter, right ? |
@heat we came across it when someone named something in the system as "null" and ran a search for "null". Ember ended up removing that query paramater due to the casting that it does. |
c7bc19c
to
913fa1d
Compare
… be set to a string of "null"
913fa1d
to
94fb668
Compare
☔ The latest upstream changes (presumably #14433) made this pull request unmergeable. Please resolve the merge conflicts. |
I think due to nathan's future work with serializing parameters, and the shifting around of this issue, and due to the fact that it's sad dormant for 6 months, I'm going to go ahead and close it as "unmerged". |
If a default query parameter is null, we should leave it as
null
and not switch it to a string value of"null"
.This came up when in a controller we had set a default value for a query parameter of
search
to benull
. Then if we tried to do a search for"null"
it would not perform the search since it was casting thenull
value to a string of"null"
for the default, and failed the difference check between the new query param and the default.Didn't see any pertinent tests in the local package tests, so I added a test to the general ember routing query param test.