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
commit d5c4482714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
});