build(router): enable bazel tests for router (#21053)

Bazel runs on newer version of RxJs than is installed in Yarn. The never version subclasses `EmptyError` in a different way which fails the `instanceof` check. This change makes the `instanceof` check more robust with respect to `EmptyError`.

PR Close #21053
This commit is contained in:
Misko Hevery
2017-12-17 20:59:37 -08:00
committed by Igor Minar
parent 3d50fd7cac
commit 40dfe39e64
3 changed files with 2 additions and 5 deletions

View File

@ -166,7 +166,7 @@ class ApplyRedirects {
const concattedProcessedRoutes$ = concatAll.call(processedRoutes$);
const first$ = first.call(concattedProcessedRoutes$, (s: any) => !!s);
return _catch.call(first$, (e: any, _: any): Observable<UrlSegmentGroup> => {
if (e instanceof EmptyError) {
if (e instanceof EmptyError || e.name === 'EmptyError') {
if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {
return of (new UrlSegmentGroup([], {}));
}