[Glitch] Fix custom `history.push` and `history.replace` building bogus location if path is omitted

Port 57a38f071b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2850/head
Claire 2024-09-19 16:58:33 +02:00
parent 9bd5838646
commit 86b9d3b4e5
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ function normalizePath(
if (
layoutFromWindow() === 'multi-column' &&
!location.pathname?.startsWith('/deck')
location.pathname &&
!location.pathname.startsWith('/deck')
) {
location.pathname = `/deck${location.pathname}`;
}