فهرست منبع

modified the null check

白石誠 5 سال پیش
والد
کامیت
a83fc35eaa
1فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  1. 2 4
      src/client/js/components/Page/NotFoundAlert.jsx

+ 2 - 4
src/client/js/components/Page/NotFoundAlert.jsx

@@ -4,12 +4,10 @@ import PropTypes from 'prop-types';
 const NotFoundAlert = (props) => {
 const NotFoundAlert = (props) => {
 
 
   function clickHandler(viewType) {
   function clickHandler(viewType) {
-    if (props.onPageCreateClicked) {
-      props.onPageCreateClicked(viewType);
-    }
-    else {
+    if (props.onPageCreateClicked === null) {
       return null;
       return null;
     }
     }
+    props.onPageCreateClicked(viewType);
   }
   }
 
 
   return (
   return (