mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): match spec updates for FakeNavigation
Updates FakeNavigation based on updates in https://github.com/whatwg/html/pull/11952
This commit is contained in:
committed by
Alex Rickabaugh
parent
835a643161
commit
d355205198
@@ -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:"
|
||||
|
||||
Reference in New Issue
Block a user