We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7370fcb commit 00aaa3cCopy full SHA for 00aaa3c
lib/index.ts
@@ -584,9 +584,9 @@ export default class Backburner {
584
585
public cancel(timer?) {
586
cancelCount++;
587
-
+
588
if (timer === undefined || timer === null) { return false; }
589
590
let timerType = typeof timer;
591
if (timerType === 'number') { // we're cancelling a throttle or debounce
592
return this._cancelItem(timer, this._throttlers) || this._cancelItem(timer, this._debouncees);
@@ -713,11 +713,9 @@ export default class Backburner {
713
714
private _runExpiredTimers() {
715
this._timerTimeoutId = null;
716
- if (this._timers.length > 0) {
717
- this.begin();
718
- this._scheduleExpiredTimers();
719
- this.end();
720
- }
+ this.begin();
+ this._scheduleExpiredTimers();
+ this.end();
721
}
722
723
private _scheduleExpiredTimers() {
0 commit comments