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

[Bug] Assertion in link-component is incorrectly running when using link-to-external #19459

Closed
hmajoros opened this issue Mar 15, 2021 · 4 comments

Comments

@hmajoros
Copy link

🐞 Describe the Bug

This change was added to provide better boundaries for linking inside/between engines with the <LinkTo> component. However, link-to-external extends link-component, and thus this assertion runs on the init of any LinkToExternal usage. When inside of a routeless engine, there is currently no way to link out, as both <LinkTo> and <LinkToExternal> throw this assertion.

🔬 Minimal Reproduction

Using ember-engines, create a routeless engine & use <LinkToExternal> inside this routeless engine

😕 Actual Behavior

Assertion fails when using link-to-external inside of a routeless engine

🤔 Expected Behavior

routeless engines should allow the usage of link-to-externala

🌍 Environment

  • Ember: 3.24.3
  • Node.js/npm: 14.15.1
  • OS: Big Sur
  • Browser: All

➕ Additional Context

@hmajoros
Copy link
Author

@chancancode I think the best way to fix this is to move this assertion check into a method inside link-component, and then have link-to-external overwrite this method with a noop. Thoughts?

@rwjblue
Copy link
Member

rwjblue commented Mar 16, 2021

@hmajoros - Ya, that seems ok to me (I really do want to get rid of <LinkToExternal /> all together, that is just a massively different problem 😝 ). Happy to land + backport a fix for this.

@hmajoros
Copy link
Author

ember.js PR: #19477
ember-engines PR: ember-engines/ember-engines#761

@hmajoros
Copy link
Author

hmajoros commented May 3, 2021

Closing issue as both ember & ember-engines fixes have now landed & been backported to 3.24.

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

No branches or pull requests

2 participants