Skip to content

Commit df4fb1d

Browse files
Stefan SchubertStefan Schubert
authored andcommitted
import takeUntil and fix comparison
1 parent 8ac0a0d commit df4fb1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mustache/api.service.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { Subject } from 'rxjs/Subject'
2424
{{/useRxJS6}}
2525
{{#useRxJS6}}
2626
import { Observable, Subject } from 'rxjs';
27-
import { catchError } from 'rxjs/operators';
27+
import { catchError, takeUntil } from 'rxjs/operators';
2828
{{/useRxJS6}}
2929
{{^useHttpClient}}
3030
import '../rxjs-operators';
@@ -338,7 +338,7 @@ export class {{classname}} {
338338
this.cancelMap['{{operationIdOriginal}}'].complete();
339339
this.cancelMap['{{operationIdOriginal}}'] = null;
340340
}
341-
this.cancelMap['{{operationIdOriginal}}'] = {{httpMethod}} === 'GET' ? new Subject<any>() : null;
341+
this.cancelMap['{{operationIdOriginal}}'] = '{{httpMethod}}'.toUpperCase() === 'GET' ? new Subject<any>() : null;
342342
if(this.cancelMap['{{operationIdOriginal}}']) {
343343
handle = handle.pipe(takeUntil(this.cancelMap['{{operationIdOriginal}}']));
344344
}
@@ -377,7 +377,7 @@ export class {{classname}} {
377377
this.cancelMap['{{operationIdOriginal}}'].complete();
378378
this.cancelMap['{{operationIdOriginal}}'] = null;
379379
}
380-
this.cancelMap['{{operationIdOriginal}}'] = {{httpMethod}} === 'GET' ? new Subject<any>() : null;
380+
this.cancelMap['{{operationIdOriginal}}'] = '{{httpMethod}}'.toUpperCase() === 'GET' ? new Subject<any>() : null;
381381
if(this.cancelMap['{{operationIdOriginal}}']) {
382382
handle = handle.takeUntil(this.cancelMap['{{operationIdOriginal}}']);
383383
}

0 commit comments

Comments
 (0)