@tinkoff/router 0.5.289 → 0.5.292

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.
@@ -126,6 +126,9 @@ class ClientRouter extends AbstractRouter {
126
126
  await this.blockHook.callPromise({ navigation });
127
127
  return;
128
128
  }
129
+ // Reset the current navigation to prevent reusing a stale navigation state
130
+ // if the user returns to the page in the same state (e.g. via bfcache restoration).
131
+ this.currentNavigation = null;
129
132
  // prevent routing from any continues navigation returning promise which will be not resolved
130
133
  return new Promise(() => { });
131
134
  }
@@ -126,6 +126,9 @@ class ClientRouter extends AbstractRouter {
126
126
  await this.blockHook.callPromise({ navigation });
127
127
  return;
128
128
  }
129
+ // Reset the current navigation to prevent reusing a stale navigation state
130
+ // if the user returns to the page in the same state (e.g. via bfcache restoration).
131
+ this.currentNavigation = null;
129
132
  // prevent routing from any continues navigation returning promise which will be not resolved
130
133
  return new Promise(() => { });
131
134
  }
@@ -130,6 +130,9 @@ class ClientRouter extends abstract.AbstractRouter {
130
130
  await this.blockHook.callPromise({ navigation });
131
131
  return;
132
132
  }
133
+ // Reset the current navigation to prevent reusing a stale navigation state
134
+ // if the user returns to the page in the same state (e.g. via bfcache restoration).
135
+ this.currentNavigation = null;
133
136
  // prevent routing from any continues navigation returning promise which will be not resolved
134
137
  return new Promise(() => { });
135
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinkoff/router",
3
- "version": "0.5.289",
3
+ "version": "0.5.292",
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": "5.53.165",
31
+ "@tramvai/core": "5.53.168",
32
32
  "react": ">=16.14.0",
33
33
  "tslib": "^2.4.0"
34
34
  },