fix: entry disappears from workflow screen on failing to merge pull request (#5085)

This commit is contained in:
senda_y 2021-03-11 21:02:24 +09:00 committed by GitHub
parent 5c3c12ec84
commit 20e89cc5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,12 +128,12 @@ function unpublishedEntries(state = Map(), action: EditorialWorkflowAction) {
);
case UNPUBLISHED_ENTRY_PUBLISH_SUCCESS:
case UNPUBLISHED_ENTRY_PUBLISH_FAILURE:
return state.deleteIn(['entities', `${action.payload!.collection}.${action.payload!.slug}`]);
case UNPUBLISHED_ENTRY_DELETE_SUCCESS:
return state.deleteIn(['entities', `${action.payload!.collection}.${action.payload!.slug}`]);
case UNPUBLISHED_ENTRY_PUBLISH_FAILURE:
default:
return state;
}