Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jan 3, 2024
1 parent 346b608 commit 313f726
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ember_debug/route-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export default class RouteDebug extends DebugPort {
}

get router() {
if (this.namespace?.owner.isDestroyed) {
if (
this.namespace?.owner.isDestroyed ||
this.namespace?.owner.isDestroying
) {
return null;
}
return this.namespace?.owner.lookup('router:main');
Expand Down Expand Up @@ -74,6 +77,12 @@ export default class RouteDebug extends DebugPort {
}

get routeTree() {
if (
this.namespace?.owner.isDestroyed ||
this.namespace?.owner.isDestroying
) {
return null;
}
if (!this._cachedRouteTree && this.router) {
const router = this.router;
const routerLib = router._routerMicrolib || router.router;
Expand Down

0 comments on commit 313f726

Please sign in to comment.