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

feat: add isExternal argument to simplify ember-engines #20151

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/@ember/-internals/glimmer/lib/components/link-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class LinkTo extends InternalComponent {
'You attempted to use the <LinkTo> component within a routeless engine, this is not supported. ' +
'If you are using the ember-engines addon, use the <LinkToExternal> component instead. ' +
'See https://ember-engines.com/docs/links for more info.',
!this.isEngine || this.engineMountPoint !== undefined
this.named('isExternal') ? true : !this.isEngine || this.engineMountPoint !== undefined
);

assert(
Expand Down Expand Up @@ -522,6 +522,8 @@ class LinkTo extends InternalComponent {

if (engineMountPoint === undefined) {
return route;
} else if (this.named('isExternal')) {
return route;
} else if (route === 'application') {
return engineMountPoint;
} else {
Expand Down