From caf22c8e0a808c2392f0cae1b6da36111cbc9467 Mon Sep 17 00:00:00 2001 From: Charles Lehner Date: Sun, 3 Jan 2010 19:45:17 -0500 Subject: [PATCH] Fixed clearTimeout to check if timer is a Timer --- src/node.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index e9a1e77b93..59bb88711a 100644 --- a/src/node.js +++ b/src/node.js @@ -443,7 +443,9 @@ GLOBAL.setInterval = function (callback, repeat) { }; GLOBAL.clearTimeout = function (timer) { - timer.stop(); + if (timer instanceof process.Timer) { + timer.stop(); + } }; GLOBAL.clearInterval = GLOBAL.clearTimeout;