summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorLi Hao <hao.x.li@intel.com>2018-10-08 15:46:49 +0800
committerBert Belder <bertbelder@gmail.com>2018-10-08 19:53:53 +0200
commit3fe6530f118c36fd2b0268a4591fef540f8f6f1f (patch)
treee36c869f3d71f140ba151a0a05f119b8af21448d /js
parent4f3250bc4341217dce0e7efd48b49c47beac77b3 (diff)
timers: fix clearTimer bug
Diffstat (limited to 'js')
-rw-r--r--js/timers.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/timers.ts b/js/timers.ts
index e503e9ccc..28de13d38 100644
--- a/js/timers.ts
+++ b/js/timers.ts
@@ -103,7 +103,7 @@ function unschedule(timer: Timer) {
// Multiple timers that are due at the same point in time.
// Remove this timer from the list.
const index = list.indexOf(timer);
- assert(index > 0);
+ assert(index > -1);
list.splice(index, 1);
}
}