Procházet zdrojové kódy

Update handleImportFile shorcut condition

cihat před 3 roky
rodič
revize
22b1aaed47
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  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]);