FIX: recover by showing drawer index on 404 (#21839)

If the drawer receives an unexpected route, attempt to show the index. This is probably a more serious issue with subfolder but should limit the effects.
This commit is contained in:
Joffrey JAFFEUX 2023-05-30 23:51:55 +02:00 committed by GitHub
parent 908117e270
commit 906e053f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -75,12 +75,6 @@ export default class ChatDrawerRouter extends Service {
} }
this.drawerRoute = ROUTES[route.name]; this.drawerRoute = ROUTES[route.name];
if (!this.drawerRoute) {
// TODO (joffrey) maybe we should implement the equivalent of a 404 here?
return;
}
this.params = this.drawerRoute?.extractParams?.(route) || route.params; this.params = this.drawerRoute?.extractParams?.(route) || route.params;
this.component = this.drawerRoute?.name || ChatDrawerIndex; this.component = this.drawerRoute?.name || ChatDrawerIndex;