fix(core): correctly delete backups for new entries (#2265)
This commit is contained in:
@ -237,9 +237,9 @@ class Editor extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
deleteBackup() {
|
deleteBackup() {
|
||||||
const { deleteLocalBackup, collection, slug } = this.props;
|
const { deleteLocalBackup, collection, slug, newEntry } = this.props;
|
||||||
this.createBackup.cancel();
|
this.createBackup.cancel();
|
||||||
deleteLocalBackup(collection, slug);
|
deleteLocalBackup(collection, !newEntry && slug);
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePersistEntry = async (opts = {}) => {
|
handlePersistEntry = async (opts = {}) => {
|
||||||
|
Reference in New Issue
Block a user