@tanstack/react-router 0.0.1-beta.249 → 0.0.1-beta.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -274,9 +274,8 @@
|
|
|
274
274
|
};
|
|
275
275
|
return history;
|
|
276
276
|
}
|
|
277
|
-
function createHashHistory({
|
|
278
|
-
window:
|
|
279
|
-
}) {
|
|
277
|
+
function createHashHistory(opts) {
|
|
278
|
+
const win = opts?.window ?? (typeof document !== 'undefined' ? window : undefined);
|
|
280
279
|
return createBrowserHistory({
|
|
281
280
|
getHref: () => win.location.hash.substring(1),
|
|
282
281
|
createHref: path => `#${path}`,
|