From: Adil Allawi Date: Thu, 15 Dec 2011 11:32:58 +0000 (+0000) Subject: oops, interval was not clearing because 'this' is not the same 'this' inside an inter... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5bd080fd0508197e34e03e2d73447b7cfe9a3c26;p=pdf.js.git oops, interval was not clearing because 'this' is not the same 'this' inside an interval. Should use local variable 'self' instead. Reviewers you should have spotted this! :) --- diff --git a/src/canvas.js b/src/canvas.js index 2d1130b..50c762b 100644 --- a/src/canvas.js +++ b/src/canvas.js @@ -361,7 +361,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { textLayerQueue.splice(i, 1); } if (textLayerQueue.length == 0) - clearInterval(this.textLayerTimer); + clearInterval(self.textLayerTimer); }, 1); },