Skip to content

Commit 5f81f25

Browse files
committed
fix: unit tests
1 parent 784ad4c commit 5f81f25

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
"dependencies": {
5656
"linked-abort-controller": "^1.1.0",
57-
"mobx-location-history": "^9.1.0",
57+
"mobx-location-history": "^9.1.1",
5858
"path-to-regexp": "^8.2.0",
5959
"react-simple-loadable": "^2.3.8",
6060
"yummies": "^6.0.0"

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/config/config.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { createGlobalDynamicConfig } from 'yummies/complex';
1010
import type { RouteGlobalConfig } from './config.types.js';
1111

1212
let localHistory: History | undefined;
13-
let localQueryParams: IQueryParams | undefined;
1413

1514
export const routeConfig = createGlobalDynamicConfig<RouteGlobalConfig>(
1615
(update) => {
@@ -29,18 +28,12 @@ export const routeConfig = createGlobalDynamicConfig<RouteGlobalConfig>(
2928
let queryParams: IQueryParams;
3029

3130
if (update?.history && !update.queryParams) {
32-
if (localQueryParams) {
33-
localQueryParams.destroy();
34-
}
35-
queryParams = localQueryParams = new QueryParams({ history });
31+
queryParams = new QueryParams({ history });
3632
} else {
37-
if (localQueryParams && update?.queryParams) {
38-
localQueryParams.destroy();
39-
}
4033
if (update?.queryParams) {
4134
queryParams = update.queryParams;
4235
} else {
43-
queryParams = localQueryParams = new QueryParams({ history });
36+
queryParams = new QueryParams({ history });
4437
}
4538
}
4639

0 commit comments

Comments
 (0)