Browse Source

Update handleImportFile shorcut condition

cihat 3 years ago
parent
commit
22b1aaed47
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/containers/ImportModal/index.tsx

+ 1 - 2
src/containers/ImportModal/index.tsx

@@ -105,8 +105,7 @@ export const ImportModal: React.FC<ModalProps> = ({ visible, setVisible }) => {
       setVisible(false);
       setVisible(false);
     }
     }
 
 
-    if (handleEnterKeyPress) {
-      console.log("test enter");
+    if (handleEnterKeyPress && (jsonFile || url)) {
       handleImportFile();
       handleImportFile();
     }
     }
   }, [handleEspacePress, handleEnterKeyPress]);
   }, [handleEspacePress, handleEnterKeyPress]);