-
-
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
[Bug] LinkTo
with incomplete model failing in rendering tests
#19364
Comments
Sorry for the delay, I won't have much time until the weekend to look into the fix |
Chatted about this with @xg-wang earlier, I think what we should do is to change this guard: ember.js/packages/@ember/-internals/routing/lib/services/routing.ts Lines 57 to 60 in e25c0f2
To be something like: let router = this.router;
// return early when the router microlib is not present, which is the case for {{link-to}} in integration tests
if (!router._hasBeganInitialRouting) {
return;
} Then update: ember.js/packages/@ember/-internals/routing/lib/system/router.ts Lines 407 to 418 in e25c0f2
To set that flag. |
Fixed by #19387, released in 3.25.1 and 3.24.2. |
🐞 Describe the Bug
We have a few components that use
LinkTo
components but are only used on subroutes with dynamic segments and have not explicitly added@model
(e.g. only used within/organizations/:org_id
). This works fine in production and up until Ember 3.24 this also worked fine in application and rendering tests.With 3.24 Ember now automatically starts the routing layer whenever something on the
router
service is accessed, and now theLinkTo
component is complaining that we did not pass the necessary models when any previous thing in the template for example accessesrouter.currentRouteName
.🔬 Minimal Reproduction
Describe steps to reproduce. If possible, please, share a link with a minimal reproduction.
😕 Actual Behavior
🤔 Expected Behavior
🌍 Environment
➕ Additional Context
somewhat related:
currentURL
in a side-effect-free way buschtoens/ember-link#518/cc @rwjblue @xg-wang
The text was updated successfully, but these errors were encountered: