瀏覽代碼

Merge remote-tracking branch 'Steuchs_bug_hunt/QSRC2TW'

Kevin_Smarts 2 月之前
父節點
當前提交
6ee3ddd1c2
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);