Skip to content

Commit

Permalink
fix: fixed an issue where we tried to resolve null as path
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Dimitrov authored and remy committed Dec 15, 2017
1 parent 14fcf94 commit 10ded94
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,20 @@ function filterAndRestart(files) {

// if there's no matches, then test to see if the changed file is the
// running script, if so, let's allow a restart
const script = path.resolve(config.options.execOptions.script);
if (matched.result.length === 0 && script) {
const length = script.length;
files.find(file => {
if (file.substr(-length, length) === script) {
matched = {
result: [ file ],
total: 1,
if (config.options.execOptions.script) {
const script = path.resolve(config.options.execOptions.script);
if (matched.result.length === 0 && script) {
const length = script.length;
files.find(file => {
if (file.substr(-length, length) === script) {
matched = {
result: [ file ],
total: 1,
}
return true;
}
return true;
}
})
})
}
}

utils.log.detail('changes after filters (before/after): ' +
Expand Down

0 comments on commit 10ded94

Please sign in to comment.