aboutsummaryrefslogtreecommitdiffstats
path: root/jsre/jsre.go
diff options
context:
space:
mode:
Diffstat (limited to 'jsre/jsre.go')
-rw-r--r--jsre/jsre.go4
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)