Skip to content

Commit bc798b1

Browse files
committed
fix(router): return promise with error handler
See https://github.com/angular/angular/pull/2528\#discussion_r32493195
1 parent 9413620 commit bc798b1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/angular2/src/router/router.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,10 @@ export class Router {
128128
ObservableWrapper.callNext(this._subject, matchedInstruction.accumulatedUrl);
129129
});
130130

131-
PromiseWrapper.catchError(result, (err) => {
131+
return PromiseWrapper.catchError(result, (err) => {
132132
this._finishNavigating();
133-
return err;
133+
throw err;
134134
});
135-
136-
return result;
137135
});
138136
}
139137

0 commit comments

Comments
 (0)