fix: duplicate entry (#3563)
This commit is contained in:
parent
0761ffa3f2
commit
1d88b15de5
@ -406,6 +406,7 @@ export function persistUnpublishedEntry(collection: Collection, existingUnpublis
|
||||
}),
|
||||
);
|
||||
dispatch(unpublishedEntryPersisted(collection, transactionID, newSlug));
|
||||
if (!existingUnpublishedEntry) return dispatch(loadUnpublishedEntry(collection, newSlug));
|
||||
} catch (error) {
|
||||
dispatch(
|
||||
notifSend({
|
||||
|
@ -762,6 +762,7 @@ export function persistEntry(collection: Collection) {
|
||||
dispatch(loadMedia());
|
||||
}
|
||||
dispatch(entryPersisted(collection, serializedEntry, slug));
|
||||
if (serializedEntry.get('newRecord')) return dispatch(loadEntry(collection, slug));
|
||||
})
|
||||
.catch((error: Error) => {
|
||||
console.error(error);
|
||||
|
@ -177,7 +177,6 @@ export class Editor extends React.Component {
|
||||
const newSlug = this.props.entryDraft && this.props.entryDraft.getIn(['entry', 'slug']);
|
||||
if (!prevProps.slug && newSlug && this.props.newEntry) {
|
||||
navigateToEntry(prevProps.collection.get('name'), newSlug);
|
||||
this.props.loadEntry(this.props.collection, newSlug);
|
||||
}
|
||||
|
||||
if (!prevProps.localBackup && this.props.localBackup) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user