mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): match spec updates for FakeNavigation
Updates FakeNavigation based on updates in https://github.com/whatwg/html/pull/11952
(cherry picked from commit d355205198)
This commit is contained in:
parent
84f397c831
commit
01ab257da4
1 changed files with 2 additions and 4 deletions
|
|
@ -956,10 +956,8 @@ function dispatchNavigateEvent({
|
|||
}
|
||||
}
|
||||
(navigation.transition as InternalNavigationTransition)?.committedResolve();
|
||||
const promisesList = handlers.map((handler) => handler());
|
||||
if (promisesList.length === 0) {
|
||||
promisesList.push(Promise.resolve());
|
||||
}
|
||||
const promisesList: Array<Promise<unknown>> = handlers.map((handler) => handler());
|
||||
promisesList.push(result.committed);
|
||||
Promise.all(promisesList)
|
||||
.then(() => {
|
||||
// Follows steps outlined under "Wait for all of promisesList, with the following success steps:"
|
||||
|
|
|
|||
Loading…
Reference in a new issue