@tramvai/module-router 1.75.0 → 1.76.1
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/lib/index.browser.js +5 -2
- package/package.json +14 -14
package/lib/index.browser.js
CHANGED
|
@@ -456,7 +456,8 @@ const providers = [
|
|
|
456
456
|
const currentRoute = store.getState(RouterStore).currentRoute;
|
|
457
457
|
// in client-side rendering mode, run navigation before hydration,
|
|
458
458
|
// because currentRoute from initialState can be undefined or incorrect
|
|
459
|
-
if (renderMode === 'client'
|
|
459
|
+
if (renderMode === 'client' &&
|
|
460
|
+
(!currentRoute || (currentRoute && currentRoute.actualPath !== window.location.pathname))) {
|
|
460
461
|
await router.navigate(window.location.href);
|
|
461
462
|
}
|
|
462
463
|
return router.rehydrate({
|
|
@@ -495,8 +496,10 @@ const providers = [
|
|
|
495
496
|
provide: commandLineListTokens.clear,
|
|
496
497
|
multi: true,
|
|
497
498
|
useFactory: (deps) => {
|
|
499
|
+
const currentRoute = deps.store.getState(RouterStore).currentRoute;
|
|
498
500
|
// in client-side rendering mode, action already was executed
|
|
499
|
-
if (deps.renderMode === 'client'
|
|
501
|
+
if (deps.renderMode === 'client' &&
|
|
502
|
+
(!currentRoute || (currentRoute && currentRoute.actualPath !== window.location.pathname))) {
|
|
500
503
|
return;
|
|
501
504
|
}
|
|
502
505
|
return runActionsFactory(deps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-router",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.76.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"@tinkoff/errors": "0.2.18",
|
|
26
26
|
"@tinkoff/router": "0.1.70",
|
|
27
27
|
"@tinkoff/url": "0.7.37",
|
|
28
|
-
"@tramvai/tokens-render": "1.
|
|
29
|
-
"@tramvai/tokens-router": "1.
|
|
30
|
-
"@tramvai/tokens-server": "1.
|
|
31
|
-
"@tramvai/experiments": "1.
|
|
28
|
+
"@tramvai/tokens-render": "1.76.1",
|
|
29
|
+
"@tramvai/tokens-router": "1.76.1",
|
|
30
|
+
"@tramvai/tokens-server": "1.76.1",
|
|
31
|
+
"@tramvai/experiments": "1.76.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@tinkoff/utils": "^2.1.2",
|
|
35
|
-
"@tramvai/cli": "1.
|
|
36
|
-
"@tramvai/core": "1.
|
|
37
|
-
"@tramvai/module-log": "1.
|
|
38
|
-
"@tramvai/module-server": "1.
|
|
39
|
-
"@tramvai/papi": "1.
|
|
40
|
-
"@tramvai/state": "1.
|
|
41
|
-
"@tramvai/test-helpers": "1.
|
|
42
|
-
"@tramvai/test-mocks": "1.
|
|
43
|
-
"@tramvai/tokens-common": "1.
|
|
35
|
+
"@tramvai/cli": "1.76.1",
|
|
36
|
+
"@tramvai/core": "1.76.1",
|
|
37
|
+
"@tramvai/module-log": "1.76.1",
|
|
38
|
+
"@tramvai/module-server": "1.76.1",
|
|
39
|
+
"@tramvai/papi": "1.76.1",
|
|
40
|
+
"@tramvai/state": "1.76.1",
|
|
41
|
+
"@tramvai/test-helpers": "1.76.1",
|
|
42
|
+
"@tramvai/test-mocks": "1.76.1",
|
|
43
|
+
"@tramvai/tokens-common": "1.76.1",
|
|
44
44
|
"@tinkoff/dippy": "0.7.38",
|
|
45
45
|
"react": "*",
|
|
46
46
|
"tslib": "^2.0.3"
|