fix(router): router should not swallow "unhandled" errors

closes #12802
This commit is contained in:
vsavkin
2016-11-10 15:26:32 -08:00
committed by Victor Berchet
parent 768cddbe62
commit e5a753e111
2 changed files with 17 additions and 2 deletions

View File

@ -596,7 +596,9 @@ export class Router {
const id = ++this.navigationId;
this.navigations.next({id, rawUrl, prevRawUrl, extras, resolve, reject, promise});
return promise;
// Make sure that the error is propagated even though `processNavigations` catch
// handler does not rethrow
return promise.catch((e: any) => Promise.reject(e));
}
private executeScheduledNavigation({id, rawUrl, prevRawUrl, extras, resolve,