diff options
Diffstat (limited to 'jsre')
-rw-r--r-- | jsre/jsre.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jsre/jsre.go b/jsre/jsre.go index 0db9e33fc..af7d507c6 100644 --- a/jsre/jsre.go +++ b/jsre/jsre.go @@ -154,7 +154,9 @@ loop: if err != nil { fmt.Println("js error:", err, arguments) } - if timer.interval { + + _, inreg := registry[timer] // when clearInterval is called from within the callback don't reset it + if timer.interval && inreg { timer.timer.Reset(timer.duration) } else { delete(registry, timer) |