- this.state.notifications && this.state.notifications.map((notification, notifIndex) => {
- let notificationFields = {};
-
- notificationFields = this.getNotificationFields(notification);
-
- displayNotifications.push(
- <tr key={notifIndex} className='notificationItem'>
- <td className='source column'> {notificationFields.source} </td>
- <td className='timestamp column'> {notificationFields.eventTime} </td>
- <td className='event column'> {notificationFields.eventKey} </td>
- <td className='details column'>
- <TreeView key={notifIndex + '-detail'} nodeLabel='Event Details'>
- {this.constructTree(notificationFields.details)}
- </TreeView>
- </td>
- </tr>
- );
- });
+ this.state.notifications &&
+ _isArray(this.state.notifications) &&
+ this.state.notifications.map((notification, notifIndex) => {
+ let notificationFields = {};
+
+ notificationFields = this.getNotificationFields(notification);
+
+ displayNotifications.push(
+ <tr key={notifIndex} className='notificationItem'>
+ <td className='source column'> {notificationFields.source} </td>
+ <td className='timestamp column'> {notificationFields.eventTime} </td>
+ <td className='event column'> {notificationFields.eventKey} </td>
+ <td className='details column'>
+ <TreeView key={notifIndex + '-detail'} nodeLabel='Event Details'>
+ {this.constructTree(notificationFields.details)}
+ </TreeView>
+ </td>
+ </tr>
+ );
+ });