From 08cdb5e2e85e17aa23a626a2104af313b3b6bdb2 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Fri, 23 Nov 2018 05:46:27 -0800 Subject: [PATCH] Fix improper plugin id assignment Summary: This diff fixes the improper plugin id getting assigned to the variable which lead to notifications not getting shown. The client id has `#` so pluginId is no longer the second argument when one splits the string by `#`. This diff fixes this problem. Reviewed By: passy Differential Revision: D13176776 fbshipit-source-id: cd5bdc33c61485e3cdc2f2dbcc615980c39c8b8c --- src/dispatcher/notifications.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dispatcher/notifications.js b/src/dispatcher/notifications.js index 73aaa1f06..5091174e1 100644 --- a/src/dispatcher/notifications.js +++ b/src/dispatcher/notifications.js @@ -87,7 +87,9 @@ export default (store: Store, logger: Logger) => { Object.keys(pluginStates).forEach(key => { if (knownPluginStates.get(key) !== pluginStates[key]) { knownPluginStates.set(key, pluginStates[key]); - const [client, pluginId] = key.split('#'); + const split = key.split('#'); + const pluginId = split.pop(); + const client = split.join('#'); const persistingPlugin: ?Class> = pluginMap.get( pluginId, );