Skip to content
Snippets Groups Projects
Commit dc4becee authored by Michael W Spalti's avatar Michael W Spalti
Browse files

Explicitly checking for undefined in dataService (since I think 0 is not truthy for number).

parent e6e9530b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment