From 93fad01ea5b7157494469df67a10541394df9f9a Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Mon, 28 Oct 2019 08:43:37 -0700 Subject: [PATCH] Summary: Fixed React 'missing key' warning for sidebar Issue was introduced in D18169459 Reviewed By: jknoxville Differential Revision: D18171025 fbshipit-source-id: e62c5cab24f198b79febd1e864aefd90dfc2f93e --- src/chrome/MainSidebar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chrome/MainSidebar.tsx b/src/chrome/MainSidebar.tsx index c2001d95d..524e4496d 100644 --- a/src/chrome/MainSidebar.tsx +++ b/src/chrome/MainSidebar.tsx @@ -29,7 +29,7 @@ import { FlipperDevicePlugin, LoadingIndicator, } from 'flipper'; -import React, {Component, PureComponent} from 'react'; +import React, {Component, PureComponent, Fragment} from 'react'; import NotificationsHub from '../NotificationsHub'; import { selectPlugin, @@ -405,7 +405,7 @@ class MainSidebar extends PureComponent { : minShowPluginsCount, ), ).map(([category, plugins]) => ( - <> + {category && ( {category} @@ -429,7 +429,7 @@ class MainSidebar extends PureComponent { app={client.query.app} /> ))} - + ))} {plugins.length > minShowPluginsCount && (