Fix custom `history.push` and `history.replace` building bogus location if path is omitted (#31980)

pull/31982/head
Claire 8 months ago committed by GitHub
parent 5a8f2fe31d
commit 57a38f071b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save