From e9aaf5d44591c41a271b6a8b175522ee5b512a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Tue, 10 Sep 2019 06:09:33 -0700 Subject: [PATCH] fix persistedPluginState Summary: The persistedState of the Layout (and potentially other plugins) wasn't updated. It turned out that the updated state value never got passed to `setPluginState`, but accidentally when adding a type declaration, the `Object` constructor was passed as value to the state. Reviewed By: jknoxville, passy Differential Revision: D17282822 fbshipit-source-id: 6fc64960ee2405ea5a705504969c36a27ac62f2c --- src/PluginContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PluginContainer.tsx b/src/PluginContainer.tsx index 03bcce110..473702f62 100644 --- a/src/PluginContainer.tsx +++ b/src/PluginContainer.tsx @@ -62,7 +62,7 @@ type DispatchFromProps = { selectedApp?: string | null; deepLinkPayload: string | null; }) => any; - setPluginState: (payload: {pluginKey: string; state: Object}) => void; + setPluginState: (payload: {pluginKey: string; state: any}) => void; }; type Props = StateFromProps & DispatchFromProps & OwnProps; @@ -133,7 +133,7 @@ class PluginContainer extends PureComponent { ...pluginState, } : pluginState, - setPersistedState: _state => setPluginState({pluginKey, state: Object}), + setPersistedState: state => setPluginState({pluginKey, state}), target, deepLinkPayload: this.props.deepLinkPayload, selectPlugin: (pluginID: string, deepLinkPayload: string | null) => {