stop navigation on failed entry save in editorial workflow
This commit is contained in:
parent
daa5395346
commit
3d65cc380e
@ -227,7 +227,7 @@ export function persistUnpublishedEntry(collection, existingUnpublishedEntry) {
|
|||||||
const entryDraft = state.entryDraft;
|
const entryDraft = state.entryDraft;
|
||||||
|
|
||||||
// Early return if draft contains validation errors
|
// Early return if draft contains validation errors
|
||||||
if (!entryDraft.get('fieldsErrors').isEmpty()) return Promise.resolve();
|
if (!entryDraft.get('fieldsErrors').isEmpty()) return Promise.reject();
|
||||||
|
|
||||||
const backend = currentBackend(state.config);
|
const backend = currentBackend(state.config);
|
||||||
const transactionID = uuid();
|
const transactionID = uuid();
|
||||||
@ -260,7 +260,7 @@ export function persistUnpublishedEntry(collection, existingUnpublishedEntry) {
|
|||||||
kind: 'danger',
|
kind: 'danger',
|
||||||
dismissAfter: 8000,
|
dismissAfter: 8000,
|
||||||
}));
|
}));
|
||||||
return dispatch(unpublishedEntryPersistedFail(error, transactionID));
|
return Promise.reject(dispatch(unpublishedEntryPersistedFail(error, transactionID)));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user