From 6df299425e2f9ba2384d1647ed1b6f6a96ef6ec8 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 11 Sep 2019 04:39:12 -0700 Subject: [PATCH] Fix dispatcher/notifications.tsx strict errors Summary: And remove one migration warning that no longer applies. Reviewed By: danielbuechele Differential Revision: D17313469 fbshipit-source-id: f29a096a0da7c14735d1d5666a54a3351df54821 --- src/dispatcher/notifications.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dispatcher/notifications.tsx b/src/dispatcher/notifications.tsx index 2de110671..7bf900435 100644 --- a/src/dispatcher/notifications.tsx +++ b/src/dispatcher/notifications.tsx @@ -35,7 +35,7 @@ export default (store: Store, logger: Logger) => { ipcRenderer.on( 'notificationEvent', ( - e, + _e: Error, eventName: NotificationEvents, pluginNotification: PluginNotification, arg: null | string | number, @@ -158,10 +158,10 @@ export default (store: Store, logger: Logger) => { // within the NOTIFICATION_THROTTLE. return; } + const plugin = pluginMap.get(n.pluginId); ipcRenderer.send('sendNotification', { payload: { title: n.notification.title, - // @ts-ignore Remove this when textContent is converted to tsx body: textContent(n.notification.message), actions: [ { @@ -174,7 +174,7 @@ export default (store: Store, logger: Logger) => { }, { type: 'button', - text: `Hide all ${pluginMap.get(n.pluginId).title || ''}`, + text: `Hide all ${plugin != null ? plugin.title : ''}`, }, ], closeButtonText: 'Hide',