don't stop watching if watch api returns no file name

This commit is contained in:
Leo Horie 2016-08-12 00:43:48 -04:00
parent 2ee15e3639
commit 15b6ff8c8b

View file

@ -101,7 +101,7 @@ module.exports = function(input, output, options) {
if (options && options.watch) {
fs.watch(process.cwd(), {recursive: true}, function(type, file) {
if (path.resolve(output) !== path.resolve(file)) run()
if (typeof file === "string" && path.resolve(output) !== path.resolve(file)) run()
})
}
}