Skip to content

Commit

Permalink
Fix react key error with position controls
Browse files Browse the repository at this point in the history
Move the key to the array of elements
  • Loading branch information
talldan committed Jan 24, 2023
1 parent c095f06 commit 6859033
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/block-editor/src/hooks/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ export function PositionPanel( props ) {
return Platform.select( {
web:
options.length > 1 ? (
<InspectorControls
key="position"
__experimentalGroup="position"
>
<InspectorControls __experimentalGroup="position">
<BaseControl className="block-editor-hooks__position-selection">
<CustomSelectControl
__nextUnconstrainedWidth
Expand Down Expand Up @@ -323,7 +320,9 @@ export const withInspectorControls = createHigherOrderComponent(
positionSupport && ! useIsPositionDisabled( props );

return [
showPositionControls && <PositionPanel { ...props } />,
showPositionControls && (
<PositionPanel key="position" { ...props } />
),
<BlockEdit key="edit" { ...props } />,
];
},
Expand Down

0 comments on commit 6859033

Please sign in to comment.