Skip to content

Commit

Permalink
fix(project): revert handling of missing current route information
Browse files Browse the repository at this point in the history
Instance-links don't correctly redirect to the relevant project.
Handling null accesses currently leads to display issues in
the navigation and need to be properly addressed and fixed.
  • Loading branch information
luytena committed Mar 18, 2024
1 parent e5a250e commit d263bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/controllers/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class ProjectController extends Controller {
@service constructionProject;

get activeProjectId() {
return Number(this.router.externalRouter.currentRoute?.params.project_id);
return Number(this.router.externalRouter.currentRoute.params.project_id);
}

get isLoading() {
Expand All @@ -20,8 +20,8 @@ export default class ProjectController extends Controller {
get displayLandingPage() {
return (
!this.projects.value?.length &&
this.router.externalRouter.currentRoute?.localName !== "new" &&
this.router.externalRouter.currentRoute?.localName !== "errors"
this.router.externalRouter.currentRoute.localName !== "new" &&
this.router.externalRouter.currentRoute.localName !== "errors"
);
}

Expand Down

0 comments on commit d263bff

Please sign in to comment.