Explorar o código

Update handleImportFile shorcut condition

cihat %!s(int64=3) %!d(string=hai) anos
pai
achega
22b1aaed47
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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);
     }
 
-    if (handleEnterKeyPress) {
-      console.log("test enter");
+    if (handleEnterKeyPress && (jsonFile || url)) {
       handleImportFile();
     }
   }, [handleEspacePress, handleEnterKeyPress]);