From 71ed2f6e25796f5fd9c4c2d30d289a5d770618d6 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Fri, 7 Oct 2022 02:52:43 -0700 Subject: [PATCH] Fix deeplinks when flipper desktop is closed Summary: Previously opening a deep link would always fail with flipper thinking the plugin did not exist. In this diff we wait for plugins to be initialized Differential Revision: D40142275 fbshipit-source-id: 7894fc60a6df57e13395e05263b0905847b11ad3 --- .../flipper-ui-core/src/dispatcher/handleOpenPluginDeeplink.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/flipper-ui-core/src/dispatcher/handleOpenPluginDeeplink.tsx b/desktop/flipper-ui-core/src/dispatcher/handleOpenPluginDeeplink.tsx index 68ecb76ec..bb50fdcd4 100644 --- a/desktop/flipper-ui-core/src/dispatcher/handleOpenPluginDeeplink.tsx +++ b/desktop/flipper-ui-core/src/dispatcher/handleOpenPluginDeeplink.tsx @@ -317,6 +317,7 @@ async function verifyPluginStatus( pluginId: string, title: string, ): Promise<[boolean, PluginStatus]> { + await waitFor(store, (state) => state.plugins.initialized); // make sure we have marketplace plugin data present if (!isTest() && !store.getState().plugins.marketplacePlugins.length) { // plugins not yet fetched