feat(ui): only cancel on staging commit if processing

This commit is contained in:
psychedelicious 2023-05-29 19:15:28 +10:00 committed by Kent Keirsey
parent a7cebbd970
commit 1ddc620192

View File

@ -10,9 +10,14 @@ export const addCommitStagingAreaImageListener = () => {
actionCreator: commitStagingAreaImage,
effect: async (action, { dispatch, getState }) => {
const state = getState();
const { sessionId } = state.system;
const { sessionId, isProcessing } = state.system;
const canvasSessionId = action.payload;
if (!isProcessing) {
// Only need to cancel if we are processing
return;
}
if (!canvasSessionId) {
moduleLog.debug('No canvas session, skipping cancel');
return;