Skip to content

Commit

Permalink
Fix custom history.push and history.replace building bogus locati…
Browse files Browse the repository at this point in the history
…on if path is omitted (mastodon#31980)
ClearlyClaire authored Sep 19, 2024

Unverified

No user is associated with the committer email.
1 parent 5a8f2fe commit 57a38f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/mastodon/components/router.tsx
Original file line number Diff line number Diff line change
@@ -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}`;
}

0 comments on commit 57a38f0

Please sign in to comment.