From 03b22dd75a7609883815c8b721337f1974ea78b9 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 1 Nov 2024 14:34:00 -0400 Subject: [PATCH] Fix reroute to not-found --- app/institutions/dashboard/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/institutions/dashboard/route.ts b/app/institutions/dashboard/route.ts index f06471c98a..16ab7b5350 100644 --- a/app/institutions/dashboard/route.ts +++ b/app/institutions/dashboard/route.ts @@ -8,6 +8,7 @@ import InstitutionDepartmentModel from 'ember-osf-web/models/institution-departm import InstitutionSummaryMetricModel from 'ember-osf-web/models/institution-summary-metric'; import { QueryHasManyResult } from 'ember-osf-web/models/osf-model'; import captureException from 'ember-osf-web/utils/capture-exception'; +import { notFoundURL } from 'ember-osf-web/utils/clean-url'; export interface InstitutionsDashboardModel { institution: InstitutionModel; @@ -42,7 +43,7 @@ export default class InstitutionsDashboardRoute extends Route { }; } catch (error) { captureException(error); - this.transitionTo('not-found', this.router.get('currentURL').slice(1)); + this.transitionTo('not-found', notFoundURL(window.location.pathname)); return undefined; } }