Merge pull request #4138 from dmitrylyzo/fix-history-back-promise

Fix resolving of the history back Promise
This commit is contained in:
Bill Thornton
2022-11-03 17:39:49 -04:00
committed by GitHub
+5 -1
View File
@@ -63,7 +63,11 @@ class AppRouter {
if (this.promiseShow) await this.promiseShow;
this.promiseShow = new Promise((resolve) => {
this.resolveOnNextShow = resolve;
const unlisten = history.listen(() => {
unlisten();
this.promiseShow = null;
resolve();
});
history.back();
});