From 3fe6530f118c36fd2b0268a4591fef540f8f6f1f Mon Sep 17 00:00:00 2001 From: Li Hao Date: Mon, 8 Oct 2018 15:46:49 +0800 Subject: timers: fix clearTimer bug --- js/timers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') 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); } } -- cgit v1.2.3