Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/node-sass
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ function watch(options, emitter) {
var handler = function(files) {
files.added.forEach(function(file) {
var watch = gaze.watched();
if (watch.indexOf(file) === -1) {
gaze.add(file);
}
Object.keys(watch).forEach(function (dir) {
if (watch[dir].indexOf(file)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you inverted this behaviour? Should it be

if (watch[dir].indexOf(file) !== -1) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Yes, I totally messed that up when I refactored (in gaze's code where I copied it from, it was set to a variable first). Will fix that right away.

gaze.add(file);
}
});
});

files.changed.forEach(function(file) {
Expand Down