白石誠 5 лет назад
Родитель
Сommit
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) => {
 
   function clickHandler(viewType) {
-    if (props.onPageCreateClicked) {
-      props.onPageCreateClicked(viewType);
-    }
-    else {
+    if (props.onPageCreateClicked === null) {
       return null;
     }
+    props.onPageCreateClicked(viewType);
   }
 
   return (