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:
parent
908117e270
commit
906e053f32
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue