Fix react fragments not having a key.

Co-authored-by: Or Fleisher <fleisher.or@gmail.com>
This commit is contained in:
vezwork 2022-06-28 11:06:44 -04:00 committed by Elliot
parent b98c5d86b6
commit 2d3466ebfe

View file

@ -73,14 +73,10 @@ export const ExtensionToolbar: React.FC<{toolbarId: string}> = ({
if (!extension || !extension.toolbars?.[toolbarId]) continue
groups.push(
<>
<React.Fragment key={'extensionToolbar-' + extension.id}>
{isAfterFirstGroup ? <GroupDivider></GroupDivider> : undefined}
<ExtensionToolsetRender
extension={extension}
key={'extensionToolbar-' + extension.id}
toolbarId={toolbarId}
/>
</>,
<ExtensionToolsetRender extension={extension} toolbarId={toolbarId} />
</React.Fragment>,
)
isAfterFirstGroup = true