Skip to content

Commit d866c1b

Browse files
authored
fix room back button not working after router update (#2630)
1 parent fbde1a2 commit d866c1b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/app/components/BackRouteHandler.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
5151
},
5252
location.pathname
5353
);
54-
if (spaceMatch?.params.spaceIdOrAlias) {
55-
navigate(getSpacePath(spaceMatch.params.spaceIdOrAlias));
54+
const encodedSpaceIdOrAlias = spaceMatch?.params.spaceIdOrAlias;
55+
const decodedSpaceIdOrAlias =
56+
encodedSpaceIdOrAlias && decodeURIComponent(encodedSpaceIdOrAlias);
57+
58+
if (decodedSpaceIdOrAlias) {
59+
navigate(getSpacePath(decodedSpaceIdOrAlias));
5660
return;
5761
}
5862
if (

0 commit comments

Comments
 (0)