Skip to content

Commit

Permalink
Merge pull request #150 from cblanquera/master
Browse files Browse the repository at this point in the history
undefined is not a function
  • Loading branch information
shama committed Sep 30, 2014
2 parents fec5450 + 6fa4f2b commit f9db239
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var watched = Object.create(null);
var renameWaiting = null;
var renameWaitingFile = null;
var emitEvents = true;
var noop = function() {};

var platform = module.exports = function(file, cb) {
if (PathWatcher == null) {
Expand Down Expand Up @@ -116,6 +117,7 @@ platform.tick = statpoll.tick.bind(statpoll);

// Close up a single watcher
platform.close = function(filepath, cb) {
cb = cb || noop;
if (Array.isArray(watched[filepath])) {
try {
for (var i = 0; i < watched[filepath].length; i++) {
Expand Down Expand Up @@ -209,4 +211,4 @@ platformUtils.linuxWorkarounds = function(event, filepath, cb) {
platformUtils.linuxProcessQueue(cb);
}, 100);
return false;
};
};

0 comments on commit f9db239

Please sign in to comment.