From c91b778fc0b4439db24b9eb6b1c5fd1575e93750 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 9 Sep 2019 07:03:00 -0700 Subject: [PATCH] Make dispatcher/notifications.tsx strict Summary: _typescript_ Reviewed By: jknoxville Differential Revision: D17204312 fbshipit-source-id: 23a3b5144545db9c165fc853ece40bb5025391e6 --- src/dispatcher/notifications.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dispatcher/notifications.tsx b/src/dispatcher/notifications.tsx index ce2366404..2de110671 100644 --- a/src/dispatcher/notifications.tsx +++ b/src/dispatcher/notifications.tsx @@ -107,7 +107,13 @@ export default (store: Store, logger: Logger) => { const split = key.split('#'); const pluginId = split.pop(); const client = split.join('#'); + + if (!pluginId) { + return; + } + const persistingPlugin: + | undefined | typeof FlipperPlugin | typeof FlipperDevicePlugin = pluginMap.get(pluginId); if (persistingPlugin && persistingPlugin.getActiveNotifications) {