Explorar el Código

Update handleImportFile shorcut condition

cihat hace 3 años
padre
commit
22b1aaed47
Se han modificado 1 ficheros con 1 adiciones y 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]);