@ethlete/core 4.29.7 → 4.29.8
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/CHANGELOG.md +6 -0
- package/fesm2022/ethlete-core.mjs +1 -25
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ethlete/core
|
|
2
2
|
|
|
3
|
+
## 4.29.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1e9dca5`](https://github.com/ethlete-io/ethdk/commit/1e9dca56ca6cf57b6a65a93e971649cacaa5428f) Thanks [@TomTomB](https://github.com/TomTomB)! - Do not try to create a router state based on the native browser url
|
|
8
|
+
|
|
3
9
|
## 4.29.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -2300,37 +2300,13 @@ const createRouterState = (router) => {
|
|
|
2300
2300
|
fragment,
|
|
2301
2301
|
};
|
|
2302
2302
|
};
|
|
2303
|
-
const createInitialRouterState = () => {
|
|
2304
|
-
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
2305
|
-
return {
|
|
2306
|
-
data: {},
|
|
2307
|
-
pathParams: {},
|
|
2308
|
-
queryParams: {},
|
|
2309
|
-
title: null,
|
|
2310
|
-
fragment: null,
|
|
2311
|
-
};
|
|
2312
|
-
const url = new URL(window.location.href);
|
|
2313
|
-
const queryParams = {};
|
|
2314
|
-
url.searchParams.forEach((value, key) => {
|
|
2315
|
-
queryParams[key] = value;
|
|
2316
|
-
});
|
|
2317
|
-
const fragment = url.hash ? url.hash.substring(1) : null;
|
|
2318
|
-
const title = document.title || null;
|
|
2319
|
-
return {
|
|
2320
|
-
data: {},
|
|
2321
|
-
pathParams: {}, // Cannot determine path params without route configuration
|
|
2322
|
-
queryParams,
|
|
2323
|
-
title,
|
|
2324
|
-
fragment,
|
|
2325
|
-
};
|
|
2326
|
-
};
|
|
2327
2303
|
/**
|
|
2328
2304
|
* Inject the complete router state. This includes the current route data, path params, query params, title and fragment.
|
|
2329
2305
|
*/
|
|
2330
2306
|
const injectRouterState = () => {
|
|
2331
2307
|
const event = injectRouterEvent();
|
|
2332
2308
|
const router = inject(Router);
|
|
2333
|
-
const routerState = signal(
|
|
2309
|
+
const routerState = signal(createRouterState(router), ...(ngDevMode ? [{ debugName: "routerState" }] : []));
|
|
2334
2310
|
effect(() => {
|
|
2335
2311
|
const e = event();
|
|
2336
2312
|
untracked(() => {
|