Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Setting to undefined does not remove in-ness. Delete the stat watcher…

… so that it won't be found upon trying to re-stablish a watch.

Otherwise, this fails:

process.watchFile("/etc/passwd", function () {});
process.unwatchFile("/etc/passwd");
process.unwatchFile("/etc/passwd"); // can't call method "stop" of "undefined"
  • Loading branch information...
commit 5e0ba72c4a87b5e1a52f131313df75d86d893de6 1 parent 2916a2a
@isaacs authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/node.js
View
2  src/node.js
@@ -276,7 +276,7 @@ process.unwatchFile = function (filename) {
if (filename in statWatchers) {
stat = statWatchers[filename];
stat.stop();
- statWatchers[filename] = undefined;
+ delete statWatchers[filename];
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.