Skip to content

Commit 7f1dc91

Browse files
committed
Provide a URL to replaceState for compatibility with jsdom
Workaround upstream jsdom bug: jsdom/jsdom#3504 The third argument to replaceState is optional, but provide it anyway for improved compatibility with all environments. The call to replaceState was introduced in bb7590a.
1 parent 0ce0e4c commit 7f1dc91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/router/history.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ function getUrlBasedHistory(
603603
// case we should log a warning as it will result in bugs.
604604
if (index == null) {
605605
index = 0;
606-
globalHistory.replaceState({ ...globalHistory.state, idx: index }, "");
606+
globalHistory.replaceState({ ...globalHistory.state, idx: index }, "", window.location.href);
607607
}
608608

609609
function getIndex(): number {

0 commit comments

Comments
 (0)