commit d34e459a20e55a4a225ab43baff457d1abb962ef parent 8974ab011e3423ef9d2560a2f079c9eb6ec51534 Author: MTRNord <mtrnord1@gmail.com> Date: Mon, 12 Mar 2018 19:13:17 +0100 Make sure we have a String when using startsWith() Diffstat:
| M | src/app/papers-list/papers-list.component.ts | | | 2 | +- |
| M | src/app/tweet-list/tweet-list.component.ts | | | 2 | +- |
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/papers-list/papers-list.component.ts b/src/app/papers-list/papers-list.component.ts @@ -33,7 +33,7 @@ export class PapersListComponent { .retryWhen(oerror => { return oerror .mergeMap((error: any) => { - if (error.status.startsWith('50')) { + if (String(error.status).startsWith('50')) { return Observable.of(error.status).delay(1000); } return Observable.throw({error: 'No retry'}); diff --git a/src/app/tweet-list/tweet-list.component.ts b/src/app/tweet-list/tweet-list.component.ts @@ -41,7 +41,7 @@ export class TweetListComponent implements OnInit { .retryWhen(oerror => { return oerror .mergeMap((error: any) => { - if (error.status.startsWith('50')) { + if (String(error.status).startsWith('50')) { return Observable.of(error.status).delay(1000); } return Observable.throw({error: 'No retry'});