fix(netlify-cms-core): workflow hide delete publish entry button (#1971)

This commit is contained in:
Bartholomew 2018-12-27 05:47:28 +01:00 committed by Shawn Erquhart
parent 79c0445768
commit 44fb2fb00d

View File

@ -253,6 +253,7 @@ class EditorToolbar extends React.Component {
onPersist,
onDelete,
onDeleteUnpublishedChanges,
showDelete,
hasChanged,
hasUnpublishedChanges,
isPersisting,
@ -275,7 +276,7 @@ class EditorToolbar extends React.Component {
<SaveButton key="save-button" onClick={() => hasChanged && onPersist()}>
{isPersisting ? t('editor.editorToolbar.saving') : t('editor.editorToolbar.save')}
</SaveButton>,
isNewEntry || !deleteLabel ? null : (
!showDelete && !hasUnpublishedChanges && !isModification ? null : (
<DeleteButton
key="delete-button"
onClick={hasUnpublishedChanges ? onDeleteUnpublishedChanges : onDelete}