瀏覽代碼

mod:客户端

panqiuyao 11 月之前
父節點
當前提交
3a4ccdf29d
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      electron/controller/imageMatting.js

+ 3 - 1
electron/controller/imageMatting.js

@@ -44,7 +44,8 @@ class ImageMattingController extends Controller {
 
     }
     const filePaths = dialog.showOpenDialogSync(dialogParams)
-    if(!filePaths[0]){
+    Log.info('filePaths:::::::::'+filePaths);
+    if(!filePaths || !filePaths[0]){
       return  false;
     }
     Log.info(filePaths);
@@ -82,6 +83,7 @@ class ImageMattingController extends Controller {
         if(img.data){
           return   img.data
         }
+        return false;
 
       }
       return   res.data