fix issue in which some files were not triggered change event

This commit is contained in:
Iuri Matias 2018-02-21 14:04:08 -05:00
parent 9df0ee9554
commit ed530e8511
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ class Watch {
// workaround for imports issue // workaround for imports issue
// so embark reacts to changes made in imported js files // so embark reacts to changes made in imported js files
if ((!Array.isArray(files) || files.length === 1)) { if (!Array.isArray(files)) {
fileGlob = path.join(path.dirname(files), '**', '*.*');
} else if (files.length === 1) {
fileGlob = path.join(path.dirname(files[0]), '**', '*.*'); fileGlob = path.join(path.dirname(files[0]), '**', '*.*');
} }