Skip to content

Commit

Permalink
Move const to the if block
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyboxer committed Nov 16, 2017
1 parent e0444ed commit 20346bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/containers/Notifications/Notifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class Notifications extends Component<Props> {
// Adapted from https://github.com/gor181/react-notification-system-redux/blob/master/src/notifications.js
const { hideNotification } = this.props
const { notifications } = nextProps
const notificationIds = notifications.map(notification => notification.id)

if (notifications.length > 0) {
const systemNotifications = this.rnsRef.state.notifications || []
const systemNotificationsIds = systemNotifications.map(notification => notification.id)
const notificationIds = notifications.map(notification => notification.id)

difference(systemNotificationsIds, notificationIds).forEach(notificationId =>
this.rnsRef.removeNotification(notificationId))
Expand Down

0 comments on commit 20346bb

Please sign in to comment.