Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Mar 2, 2022
1 parent 77c3174 commit 147981e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/fake-timers-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,8 @@ function withGlobal(_global) {
clock.now +
(parseInt(timer.delay) || (clock.duringTick ? 1 : 0));

// re-add if removed
if (!clock.timers[timer.id]) {
clock.timers[timer.id] = timer;
}
// it _might_ have been removed, but if not the assignment is perfectly fine
clock.timers[timer.id] = timer;

return res;
},
Expand Down

0 comments on commit 147981e

Please sign in to comment.