Skip to content

Commit

Permalink
services/link-manager: Adjust isRouterInitialized to Ember 3.24 com…
Browse files Browse the repository at this point in the history
…patibility
  • Loading branch information
Turbo87 committed Jan 27, 2021
1 parent bed3ea7 commit c9f1111
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addon/services/link-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ export default class LinkManagerService extends Service {
* @see https://github.com/buschtoens/ember-link/issues/126
*/
get isRouterInitialized() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return Boolean((this.router as any)._router._routerMicrolib);
return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Boolean((this.router as any)._router._routerMicrolib) &&
this.router.currentURL !== null
);
}

/**
Expand Down

0 comments on commit c9f1111

Please sign in to comment.