Skip to content

Commit

Permalink
fix: child list element should have key prop
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfedak committed Aug 4, 2024
1 parent e9f60cc commit db47712
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/decap-cms-core/src/components/Editor/EditorToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,20 @@ export class EditorToolbar extends React.Component {
</SaveButton>,
currentStatus
? [
this.renderWorkflowStatusControls(),
this.renderNewEntryWorkflowPublishControls({ canCreate, canPublish }),
<React.Fragment key="workflow-status-controls">
{this.renderWorkflowStatusControls()}
{!hasChanged && this.renderNewEntryWorkflowPublishControls({ canCreate, canPublish })}
</React.Fragment>,
]
: !isNewEntry &&
this.renderExistingEntryWorkflowPublishControls({ canCreate, canPublish, canDelete }),
: !isNewEntry && (
<React.Fragment key="existing-entry-workflow-publish-controls">
{this.renderExistingEntryWorkflowPublishControls({
canCreate,
canPublish,
canDelete,
})}
</React.Fragment>
),
(!showDelete || useOpenAuthoring) && !hasUnpublishedChanges && !isModification ? null : (
<DeleteButton
key="delete-button"
Expand Down

0 comments on commit db47712

Please sign in to comment.