JS Build: Fix watch exits when encountering an error
This commit is contained in:
parent
c31a40c749
commit
e7f899c09d
1 changed files with 3 additions and 2 deletions
|
@ -102,6 +102,7 @@ async function processFile(path) {
|
|||
}
|
||||
}
|
||||
catch (err) {
|
||||
onError(err);
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
|
@ -116,7 +117,7 @@ async function processFiles(mutex) {
|
|||
let t2 = Date.now();
|
||||
let aggrResult;
|
||||
|
||||
if (results.length === 1) {
|
||||
if (results.length === 1 && results[0]) {
|
||||
onSuccess(results[0]);
|
||||
aggrResult = results[0];
|
||||
}
|
||||
|
@ -140,7 +141,7 @@ async function processFiles(mutex) {
|
|||
|
||||
onSuccess(await cleanUp(signatures));
|
||||
|
||||
if (shouldAddOmni && aggrResult.outFiles?.length) {
|
||||
if (shouldAddOmni && aggrResult?.outFiles?.length) {
|
||||
onSuccess(await addOmniFiles(aggrResult.outFiles));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue