Ran into a weird bug when you call replaceRoute and only change query params for the current route inside the setup method. What happens is the setup method runs and the query params are changed. The subsequent call ember parachute makes to queryParamsDidChange seems to contain the original(not updated) values in queryParams but includes any updated query params in changed. This cause some weird issues with my logic which was relying on changed.
Assume we have query params foo and bar and they default to empty strings. First hit the route and setup is called where the queryParams are { foo: '', bar: '' }. Then use replaceRoute in setup and set them to { foo: 'foo', bar: 'bar' }. When queryParamsDidChange is called its queryParams will be { foo: '', bar: '' }. but its changed will be { foo: 'foo', bar: 'bar' }. Let me know if you need a full reproduction and I can toss one together.
Ran into a weird bug when you call replaceRoute and only change query params for the current route inside the setup method. What happens is the setup method runs and the query params are changed. The subsequent call ember parachute makes to queryParamsDidChange seems to contain the original(not updated) values in
queryParams
but includes any updated query params inchanged
. This cause some weird issues with my logic which was relying onchanged
.Assume we have query params
foo
andbar
and they default to empty strings. First hit the route andsetup
is called where thequeryParams
are{ foo: '', bar: '' }
. Then use replaceRoute insetup
and set them to{ foo: 'foo', bar: 'bar' }
. When queryParamsDidChange is called itsqueryParams
will be{ foo: '', bar: '' }
. but itschanged
will be{ foo: 'foo', bar: 'bar' }
. Let me know if you need a full reproduction and I can toss one together.