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,10 +232,12 @@ function watch(options, emitter) {
var handler = function(files) {
files.added.forEach(function(file) {
var watch = gaze.watched();
if (watch.indexOf(file) === -1) {
Object.keys(watch).forEach(function (dir) {
if (watch[dir].indexOf(file) !== -1) {
gaze.add(file);
}
});
});
files.changed.forEach(function(file) {
if (path.basename(file)[0] !== '_') {
......
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