Commit 824fbd5f by Evan Payne Committed by Michael Mifsud

gaze.watched returns an object (#2147)

* gaze.watched returns an object

Since it returns an object, we need to run through the keys, a simple index of isn't enough.  This should fix https://github.com/sass/node-sass/issues/2139
parent 82ac87fb
...@@ -232,9 +232,11 @@ function watch(options, emitter) { ...@@ -232,9 +232,11 @@ function watch(options, emitter) {
var handler = function(files) { var handler = function(files) {
files.added.forEach(function(file) { files.added.forEach(function(file) {
var watch = gaze.watched(); var watch = gaze.watched();
if (watch.indexOf(file) === -1) { Object.keys(watch).forEach(function (dir) {
gaze.add(file); if (watch[dir].indexOf(file) !== -1) {
} gaze.add(file);
}
});
}); });
files.changed.forEach(function(file) { files.changed.forEach(function(file) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment