Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit ae2805e

Browse files
committed
avoid extra lookup for notifications
Auditors: @jonathansampson
1 parent d60cdf1 commit ae2805e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

js/components/main.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ class Main extends ImmutableComponent {
738738

739739
const notifications = this.props.appState.get('notifications')
740740
const hasNotifications = notifications && notifications.size
741-
const notificationBarOrigin = this.props.appState.get('notifications').map(bar => bar.get('frameOrigin'))
741+
const notificationBarOrigin = notifications.map(bar => bar.get('frameOrigin'))
742742

743743
return <div id='window'
744744
className={cx({
@@ -921,8 +921,7 @@ class Main extends ImmutableComponent {
921921
/>
922922
{
923923
hasNotifications && activeFrame
924-
? <NotificationBar notifications={this.props.appState.get('notifications')}
925-
activeFrame={activeFrame} />
924+
? <NotificationBar notifications={notifications} activeFrame={activeFrame} />
926925
: null
927926
}
928927

0 commit comments

Comments
 (0)