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 if (!extension || !extension.toolbars?.[toolbarId]) continue
groups.push( groups.push(
<> <React.Fragment key={'extensionToolbar-' + extension.id}>
{isAfterFirstGroup ? <GroupDivider></GroupDivider> : undefined} {isAfterFirstGroup ? <GroupDivider></GroupDivider> : undefined}
<ExtensionToolsetRender <ExtensionToolsetRender extension={extension} toolbarId={toolbarId} />
extension={extension} </React.Fragment>,
key={'extensionToolbar-' + extension.id}
toolbarId={toolbarId}
/>
</>,
) )
isAfterFirstGroup = true isAfterFirstGroup = true