@tinkoff/router 0.2.9 → 0.2.10
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.
|
@@ -102,6 +102,10 @@ class ClientRouter extends AbstractRouter {
|
|
|
102
102
|
window.location.assign(nextUrl);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
else if (this.onBlock) {
|
|
106
|
+
// last resort case for CSR fallback
|
|
107
|
+
return this.onBlock(navigation);
|
|
108
|
+
}
|
|
105
109
|
// prevent routing from any continues navigation returning promise which will be not resolved
|
|
106
110
|
return new Promise(() => { });
|
|
107
111
|
}
|
package/lib/router/client.es.js
CHANGED
|
@@ -102,6 +102,10 @@ class ClientRouter extends AbstractRouter {
|
|
|
102
102
|
window.location.assign(nextUrl);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
else if (this.onBlock) {
|
|
106
|
+
// last resort case for CSR fallback
|
|
107
|
+
return this.onBlock(navigation);
|
|
108
|
+
}
|
|
105
109
|
// prevent routing from any continues navigation returning promise which will be not resolved
|
|
106
110
|
return new Promise(() => { });
|
|
107
111
|
}
|
package/lib/router/client.js
CHANGED
|
@@ -106,6 +106,10 @@ class ClientRouter extends abstract.AbstractRouter {
|
|
|
106
106
|
window.location.assign(nextUrl);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
else if (this.onBlock) {
|
|
110
|
+
// last resort case for CSR fallback
|
|
111
|
+
return this.onBlock(navigation);
|
|
112
|
+
}
|
|
109
113
|
// prevent routing from any continues navigation returning promise which will be not resolved
|
|
110
114
|
return new Promise(() => { });
|
|
111
115
|
}
|