Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 824fbd5

Browse files
evanfuturexzyfer
authored andcommitted
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 #2139
1 parent 82ac87f commit 824fbd5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/node-sass

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,11 @@ function watch(options, emitter) {
232232
var handler = function(files) {
233233
files.added.forEach(function(file) {
234234
var watch = gaze.watched();
235-
if (watch.indexOf(file) === -1) {
236-
gaze.add(file);
237-
}
235+
Object.keys(watch).forEach(function (dir) {
236+
if (watch[dir].indexOf(file) !== -1) {
237+
gaze.add(file);
238+
}
239+
});
238240
});
239241

240242
files.changed.forEach(function(file) {

0 commit comments

Comments
 (0)