emberjs / emberjs/ember.js

QP only transition in beforeModel of application route throws error

Open
#11,563 7 comments 2 reactions 0 assignees View on GitHub
bug Needs Reproduction Query Params Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

Reproduction: http://emberjs.jsbin.com/verocu/2/edit?html,js,output

Our app does some `beforeModel` checking of data to see what "location" the user is operating. If know query param for this is provided call `transitionTo` in order to force the user is at a location.

Because of some other logic I just added a `catch` to the promise chain that the `transitionTo` is a part of. Now I'm noticing the error shown in the above jsbin.

Interesting thing when trying to recreate is that if you have no `catch` on the promise chain and the QP is set `refreshTrue` then a second transition will fire, will have the correct query param and so the user won't notice the failure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.