Skip to content

Commit 6754cb4

Browse files
committed
return timer(0) instead of EMPTY
1 parent 477403b commit 6754cb4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/components/ng-http-loader.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
11-
import { EMPTY, merge, Observable, Subscription, timer } from 'rxjs';
11+
import { merge, Observable, Subscription, timer } from 'rxjs';
1212
import { debounce, delayWhen } from 'rxjs/operators';
1313
import { PendingInterceptorService } from '../services/pending-interceptor.service';
1414
import { SpinnerVisibilityService } from '../services/spinner-visibility.service';
@@ -63,7 +63,7 @@ export class NgHttpLoaderComponent implements OnDestroy, OnInit {
6363
}
6464

6565
private nullifySpinnerIfEntryComponentIsDefined(): void {
66-
if (null != this.entryComponent) {
66+
if (this.entryComponent) {
6767
this.spinner = null;
6868
}
6969
}
@@ -104,12 +104,12 @@ export class NgHttpLoaderComponent implements OnDestroy, OnInit {
104104
this.isSpinnerVisible = hasPendingRequests;
105105
}
106106

107-
private handleDebounceDelay(hasPendingRequests: boolean): Observable<number | never> {
107+
private handleDebounceDelay(hasPendingRequests: boolean): Observable<number> {
108108
if (hasPendingRequests && !!this.debounceDelay) {
109109
return timer(this.debounceDelay);
110110
}
111111

112-
return EMPTY;
112+
return timer(0);
113113
}
114114

115115
private handleMinDuration(hasPendingRequests: boolean): Observable<number> {

0 commit comments

Comments
 (0)