@tanstack/router-core 0.0.1-beta.2 → 0.0.1-beta.3
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.
- package/build/cjs/packages/router-core/src/router.js +2 -2
- package/build/cjs/packages/router-core/src/router.js.map +1 -1
- package/build/esm/index.js +2 -2
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +132 -132
- package/build/umd/index.development.js +2 -2
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +3 -4
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -320,13 +320,12 @@ export interface Router<
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
// Detect if we're in the DOM
|
|
323
|
-
const isServer =
|
|
324
|
-
typeof window === 'undefined' || !window.document?.createElement
|
|
325
|
-
)
|
|
323
|
+
const isServer =
|
|
324
|
+
typeof window === 'undefined' || !window.document?.createElement
|
|
326
325
|
|
|
327
326
|
// This is the default history object if none is defined
|
|
328
327
|
const createDefaultHistory = () =>
|
|
329
|
-
|
|
328
|
+
isServer ? createMemoryHistory() : createBrowserHistory()
|
|
330
329
|
|
|
331
330
|
export function createRouter<
|
|
332
331
|
TRouteConfig extends AnyRouteConfig = RouteConfig,
|