Răsfoiți Sursa

change null check style

kaori-t 5 ani în urmă
părinte
comite
b8eb75e89e

+ 4 - 2
src/client/js/components/Admin/ImportData/GrowiArchive/UploadForm.jsx

@@ -37,8 +37,10 @@ class UploadForm extends React.Component {
       this.props.onUpload(data);
       this.props.onUpload(data);
     }
     }
     catch (err) {
     catch (err) {
-      if (err[0].code === 'versions-are-not-met' && this.props.onVersionMismatch !== null) {
-        this.props.onVersionMismatch(err[0].code);
+      if (err[0].code === 'versions-are-not-met') {
+        if (this.props.onVersionMismatch !== null) {
+          this.props.onVersionMismatch(err[0].code);
+        }
       }
       }
       else {
       else {
         toastError(err);
         toastError(err);