aboutsummaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts')
-rw-r--r--tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts
index d936aa92f6..5a040f57e3 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts
+++ b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/throttle.ts
@@ -41,6 +41,9 @@ export const defaultThrottleConfig: ThrottleConfig = {
* ## Example
* Emit clicks at a rate of at most one click per second
* ```javascript
+ * import { fromEvent } from 'rxjs';
+ * import { throttle } from 'rxjs/operators';
+ *
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(throttle(ev => interval(1000)));
* result.subscribe(x => console.log(x));
@@ -122,7 +125,7 @@ class ThrottleSubscriber<T, R> extends OuterSubscriber<T, R> {
private throttle(value: T): void {
const duration = this.tryDurationSelector(value);
- if (duration) {
+ if (!!duration) {
this.add(this._throttled = subscribeToResult(this, duration));
}
}