fix(core): correctly delete backups for new entries (#2265)
This commit is contained in:
parent
f5e148f9a7
commit
a6c51fe14d
@ -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 = {}) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user