Skip to content

Commit

Permalink
emit update when the template is changed the first time when the even…
Browse files Browse the repository at this point in the history
…t == "add"
  • Loading branch information
MaxKramnik committed Feb 9, 2015
1 parent 3dd3158 commit 4ce458e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node-loaders.js
Expand Up @@ -29,7 +29,7 @@ var FileSystemLoader = Loader.extend({
var watcher = chokidar.watch(p, { ignoreInitial: true });

watcher.on("all", function(event, fullname) {
if(event == "change" && fullname in this.pathsToNames) {
if((event == "add" || event == "change") && fullname in this.pathsToNames) {
this.emit('update', this.pathsToNames[fullname]);
}
}.bind(this));
Expand Down

0 comments on commit 4ce458e

Please sign in to comment.