diff --git a/lib/monitor/watch.js b/lib/monitor/watch.js index 99f0b66b..13b63b7a 100644 --- a/lib/monitor/watch.js +++ b/lib/monitor/watch.js @@ -91,12 +91,12 @@ function watch() { } watchedFiles.push(file); - watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes - total = watchedFiles.length; bus.emit('watching', file); debug('watching dir: %s', file); }); watcher.on('ready', function () { + watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes + total = watchedFiles.length; watcher.ready = true; resolve(total); debugRoot('watch is complete');