白石誠 пре 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) => {
 
   function clickHandler(viewType) {
-    if (props.onPageCreateClicked) {
-      props.onPageCreateClicked(viewType);
-    }
-    else {
+    if (props.onPageCreateClicked === null) {
       return null;
     }
+    props.onPageCreateClicked(viewType);
   }
 
   return (