itizawa 6 лет назад
Родитель
Сommit
cc8d8971d4
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      src/client/js/components/Admin/Notification/UserTriggerNotification.jsx

+ 2 - 3
src/client/js/components/Admin/Notification/UserTriggerNotification.jsx

@@ -124,10 +124,9 @@ class UserTriggerNotification extends React.Component {
                 <button type="button" className="btn btn-primary" disabled={!this.validateForm()} onClick={this.onClickSubmit}>{t('add')}</button>
                 <button type="button" className="btn btn-primary" disabled={!this.validateForm()} onClick={this.onClickSubmit}>{t('add')}</button>
               </td>
               </td>
             </tr>
             </tr>
-            {userNotifications.map((notification) => {
+            {userNotifications.length > 0 && userNotifications.map((notification) => {
               return <UserNotificationRow notification={notification} onClickDeleteBtn={this.onClickDeleteBtn} key={notification._id} />;
               return <UserNotificationRow notification={notification} onClickDeleteBtn={this.onClickDeleteBtn} key={notification._id} />;
-            })
-            }
+            })}
           </tbody>
           </tbody>
         </table>
         </table>
       </React.Fragment>
       </React.Fragment>