mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
fix: fixed an issue where we tried to resolve null as path
This commit is contained in:
committed by
Remy Sharp
parent
14fcf94404
commit
10ded94cd7
@@ -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): ' +
|
||||
|
||||
Reference in New Issue
Block a user