Prechádzať zdrojové kódy

[SugarCube] Fix `node:internal/event_target:1090`-error.

Stephan Fuchs 2 mesiacov pred
rodič
commit
0626de57f4
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      qsrc2tw/tools/QSRC2TW/index.js

+ 2 - 2
qsrc2tw/tools/QSRC2TW/index.js

@@ -81,8 +81,8 @@ const convertPromise = new Promise((resolve, reject) => {
             generatedFilesPrefix: generatedFilesPrefix,
             options:options,
         }, (err, result) => {
-            const wasSuccessful = (result[0] == 0);
-            const message = result[1];
+            const wasSuccessful = (result?.[0] === 0);
+            const message = result?.[1] ?? '';
 
             if(!wasSuccessful){
                 const displayFilePath = baseFileName(filePath);