From b117a36f8a343f7dd1fc2c9577dda2e9cc0488a7 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 14 Jan 2020 04:26:52 -0800 Subject: [PATCH] Flipper fails to load on Windows because of ifinite PluginContainer component update loop Summary: Flipper fails to load on Windows because of inifinite update loop in PluginContainer component. Reviewed By: mweststrate Differential Revision: D19374611 fbshipit-source-id: f2039c055ffefe508c8cf5bcfcd16fffc97a10b8 --- src/PluginContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PluginContainer.tsx b/src/PluginContainer.tsx index 8ac066611..15965b8de 100644 --- a/src/PluginContainer.tsx +++ b/src/PluginContainer.tsx @@ -142,7 +142,7 @@ class PluginContainer extends PureComponent { }; idler?: Idler; - pluginBeingProcessed: string = ''; + pluginBeingProcessed: string | null = null; state = {progress: {current: 0, total: 0}}; @@ -169,7 +169,7 @@ class PluginContainer extends PureComponent { processMessageQueue() { const {pluginKey, pendingMessages, activePlugin} = this.props; if (pluginKey !== this.pluginBeingProcessed) { - this.pluginBeingProcessed = pluginKey ?? ''; + this.pluginBeingProcessed = pluginKey; this.cancelCurrentQueue(); this.setState({progress: {current: 0, total: 0}}); if (