Skip to content

Commit

Permalink
Components: Fix React Warning triggers by the new JSX transform (Word…
Browse files Browse the repository at this point in the history
…Press#61917)

Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
4 people authored and patil-vipul committed Jun 17, 2024
1 parent af74a6b commit 57cff24
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function ColorPanelDropdown( {
panelId,
} ) {
const currentTab = tabs.find( ( tab ) => tab.userValue !== undefined );

const { key: firstTabKey, ...firstTab } = tabs[ 0 ] ?? {};
return (
<ToolsPanelItem
className="block-editor-tools-panel-color-gradient-settings__item"
Expand Down Expand Up @@ -251,7 +251,8 @@ function ColorPanelDropdown( {
<div className="block-editor-panel-color-gradient-settings__dropdown-content">
{ tabs.length === 1 && (
<ColorPanelTab
{ ...tabs[ 0 ] }
key={ firstTabKey }
{ ...firstTab }
colorGradientControlSettings={
colorGradientControlSettings
}
Expand Down

0 comments on commit 57cff24

Please sign in to comment.