mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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];
|
||||
|
||||
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.component = this.drawerRoute?.name || ChatDrawerIndex;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user