Skip to content
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 release] Ensure query param only <LinkTo /> are properly scoped in engines. #19337

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jan 14, 2021

Prior to this change, the test would fail with the following:

Assertion Failed: You attempted to generate a link for the "UNDEFINED" route, but did not pass the models required for generating its dynamic segments. There is no route named blog.blog.category
    at assert (http://localhost:7020/tests/ember.js:32996:15)
    at Class.computeLinkToComponentHref (http://localhost:7020/tests/ember.js:5808:50)
    at http://localhost:7020/tests/ember.js:11860:25
    at untrack (http://localhost:7020/tests/ember.js:54650:14)
    at ComputedProperty.get (http://localhost:7020/tests/ember.js:11859:32)
    at Class.getter [as href] (http://localhost:7020/tests/ember.js:10949:25)
    at getPossibleMandatoryProxyValue (http://localhost:7020/tests/ember.js:11250:19)
    at _getProp (http://localhost:7020/tests/ember.js:11315:17)
    at http://localhost:7020/tests/ember.js:45192:45
    at http://localhost:7020/tests/ember.js:45140:37

This is because inside a QP only transition we always use _currentRoute which has already been namespaced.


Introduced in #19223 (and released in 3.24.0).

…ed in engines.

Prior to this change, the test would fail with the following:

```
Assertion Failed: You attempted to generate a link for the "UNDEFINED" route, but did not pass the models required for generating its dynamic segments. There is no route named blog.blog.category
    at assert (http://localhost:7020/tests/ember.js:32996:15)
    at Class.computeLinkToComponentHref (http://localhost:7020/tests/ember.js:5808:50)
    at http://localhost:7020/tests/ember.js:11860:25
    at untrack (http://localhost:7020/tests/ember.js:54650:14)
    at ComputedProperty.get (http://localhost:7020/tests/ember.js:11859:32)
    at Class.getter [as href] (http://localhost:7020/tests/ember.js:10949:25)
    at getPossibleMandatoryProxyValue (http://localhost:7020/tests/ember.js:11250:19)
    at _getProp (http://localhost:7020/tests/ember.js:11315:17)
    at http://localhost:7020/tests/ember.js:45192:45
    at http://localhost:7020/tests/ember.js:45140:37
```

This is because inside a QP only transition we always use
`_currentRoute` which has **already been namespaced**.
@rwjblue
Copy link
Member Author

rwjblue commented Jan 14, 2021

/cc @chancancode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants