From 8ae5e415db50101918efe1b2a552157ad839a0ef Mon Sep 17 00:00:00 2001
From: Michael W Spalti <mspalti@gmail.com>
Date: Mon, 16 Sep 2019 12:13:24 -0700
Subject: [PATCH] Explicitly checking for undefined in dataService (since I
 think 0 is not truthy for number).

---
 src/app/core/data/data.service.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts
index dcba9f1643..aad527ea7a 100644
--- a/src/app/core/data/data.service.ts
+++ b/src/app/core/data/data.service.ts
@@ -134,7 +134,7 @@ export abstract class DataService<T extends CacheableObject> {
       first((href: string) => hasValue(href)))
       .subscribe((href: string) => {
         const request = new FindAllRequest(this.requestService.generateRequestId(), href, options);
-        if (this.resetMsToLive) {
+        if (this.resetMsToLive !== undefined) {
           request.responseMsToLive = this.resetMsToLive;
         }
         this.requestService.configure(request);
@@ -160,7 +160,7 @@ export abstract class DataService<T extends CacheableObject> {
       find((href: string) => hasValue(href)))
       .subscribe((href: string) => {
         const request = new FindByIDRequest(this.requestService.generateRequestId(), href, id);
-        if (this.resetMsToLive) {
+        if (this.resetMsToLive !== undefined) {
           request.responseMsToLive = this.resetMsToLive;
         }
         this.requestService.configure(request);
@@ -171,7 +171,7 @@ export abstract class DataService<T extends CacheableObject> {
 
   findByHref(href: string, options?: HttpOptions): Observable<RemoteData<T>> {
     const request = new GetRequest(this.requestService.generateRequestId(), href, null, options);
-    if (this.resetMsToLive) {
+    if (this.resetMsToLive !== undefined) {
       request.responseMsToLive = this.resetMsToLive;
     }
     this.requestService.configure(request);
-- 
GitLab