Browse Source

fs: added an argument check in fs.watchFile

Fixes #1324.
v0.7.4-release
Yoshihiro Kikuchi 13 years ago
committed by Ben Noordhuis
parent
commit
3c4c36068e
  1. 4
      lib/fs.js

4
lib/fs.js

@ -629,6 +629,10 @@ fs.watchFile = function(filename) {
listener = arguments[1];
}
if (!listener) {
throw new Error('watchFile requires a listener function');
}
if (options.persistent === undefined) options.persistent = true;
if (options.interval === undefined) options.interval = 0;

Loading…
Cancel
Save