Revert "refactor(router): Remove promise catch and re-reject (#48067)" (#48135)

This reverts commit 07c9396824. This
change caused test failures (both unit and integration). Though the code
looks like it should be a no-op update, it's possible it affecting
something to do with microtasks, zoneJS, and change detection. More
investigation would need to be done into the exact nature of the
failures.

PR Close #48135
This commit is contained in:
Andrew Scott
2022-11-20 07:06:53 -08:00
committed by Dylan Hunn
parent 02fb43a347
commit 0a8b943d10
+5 -1
View File
@@ -1413,7 +1413,11 @@ export class Router {
currentRouterState: this.routerState
});
return promise;
// Make sure that the error is propagated even though `processNavigations` catch
// handler does not rethrow
return promise.catch((e: any) => {
return Promise.reject(e);
});
}
private setBrowserUrl(url: UrlTree, t: NavigationTransition) {