소스 검색

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