From 6d36dba2dc680b5f1bb3a2faf3d371a737b5cf35 Mon Sep 17 00:00:00 2001 From: Tom Nightingale Date: Fri, 27 Jul 2012 11:40:17 -0700 Subject: [PATCH] fix IE8 error with calling call() on window.clearTimeout() --- src/core/Util.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/Util.js b/src/core/Util.js index af3bd6ed..f65b8fbd 100644 --- a/src/core/Util.js +++ b/src/core/Util.js @@ -120,7 +120,10 @@ L.Util = { var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || - getPrefixed('CancelRequestAnimationFrame') || window.clearTimeout; + getPrefixed('CancelRequestAnimationFrame') || + function (id) { + window.clearTimeout(id); + }; L.Util.requestAnimFrame = function (fn, context, immediate, element) {