Skip to content

Commit 99ede45

Browse files
committedMar 23, 2019
remove redundant timer length check
1 parent 4950e09 commit 99ede45

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎lib/index.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ export default class Backburner {
546546

547547
public cancel(timer?) {
548548
cancelCount++;
549+
549550
if (timer === null || timer === undefined) { return false; }
550551
let timerType = typeof timer;
551552

@@ -715,11 +716,9 @@ export default class Backburner {
715716

716717
private _runExpiredTimers() {
717718
this._timerTimeoutId = null;
718-
if (this._timers.length > 0) {
719-
this.begin();
720-
this._scheduleExpiredTimers();
721-
this.end();
722-
}
719+
this.begin();
720+
this._scheduleExpiredTimers();
721+
this.end();
723722
}
724723

725724
private _scheduleExpiredTimers() {

0 commit comments

Comments
 (0)