@tinkoff/router 0.7.59 → 0.7.62
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.
|
@@ -257,17 +257,21 @@ class Router extends ClientRouter {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
cancel(navigation) {
|
|
260
|
+
let result;
|
|
260
261
|
logger.debug({
|
|
261
262
|
event: 'cancel',
|
|
262
263
|
navigation: navigation ?? this.currentNavigation,
|
|
263
264
|
});
|
|
264
265
|
if (navigation) {
|
|
265
266
|
navigation.skipped = true;
|
|
267
|
+
result = navigation;
|
|
266
268
|
}
|
|
267
|
-
if (!navigation || navigation === this.currentNavigation) {
|
|
269
|
+
if (this.currentNavigation && (!navigation || navigation === this.currentNavigation)) {
|
|
270
|
+
result = this.currentNavigation;
|
|
268
271
|
this.currentNavigation.skipped = true;
|
|
269
272
|
this.currentNavigation = null;
|
|
270
273
|
}
|
|
274
|
+
return result;
|
|
271
275
|
}
|
|
272
276
|
async _flatten(nav) {
|
|
273
277
|
await this.resolveIfDelayFound(super.run(nav));
|
package/lib/router/browser.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class Router extends ClientRouter {
|
|
|
22
22
|
private getPrevTransition;
|
|
23
23
|
private restoreAppliedViewTransitions;
|
|
24
24
|
private saveAppliedViewTransitions;
|
|
25
|
-
cancel(navigation?: Navigation): void;
|
|
25
|
+
cancel(navigation?: Navigation): void | Navigation;
|
|
26
26
|
private _flatten;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=browser.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkoff/router",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.62",
|
|
4
4
|
"description": "router",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"use-sync-external-store": "^1.4.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@tramvai/core": "7.17.
|
|
31
|
+
"@tramvai/core": "7.17.5",
|
|
32
32
|
"react": ">=16.14.0",
|
|
33
33
|
"tslib": "^2.4.0"
|
|
34
34
|
},
|