Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fixed clearTimeout to check if timer is a Timer
Browse files Browse the repository at this point in the history
  • Loading branch information
clehner authored and ry committed Jan 5, 2010
1 parent a650138 commit caf22c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node.js
Expand Up @@ -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;
Expand Down

0 comments on commit caf22c8

Please sign in to comment.