Skip to content

Commit

Permalink
Merge pull request neos#1727 from neos/dimaip/safe-discard
Browse files Browse the repository at this point in the history
BUGFIX: don't allow to publish/discard while publishing/discarding/saving
  • Loading branch information
dimaip authored Mar 30, 2018
2 parents 1f5b705 + bb83499 commit 65517f5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default class PublishDropDown extends PureComponent {
publishableNodes,
publishableNodesInDocument,
isSaving,
isPublishing,
isDiscarding,
isAutoPublishingEnabled,
isWorkspaceReadOnly,
toggleAutoPublishing,
Expand All @@ -102,8 +104,8 @@ export default class PublishDropDown extends PureComponent {
const workspaceModuleUri = $get('routes.core.modules.workspaces', neos);
const allowedWorkspaces = $get('configuration.allowedTargetWorkspaces', neos);
const baseWorkspaceTitle = $get([baseWorkspace, 'title'], allowedWorkspaces);
const canPublishLocally = publishableNodesInDocument && (publishableNodesInDocument.count() > 0);
const canPublishGlobally = publishableNodes && (publishableNodes.count() > 0);
const canPublishLocally = !isSaving && !isPublishing && !isDiscarding && publishableNodesInDocument && (publishableNodesInDocument.count() > 0);
const canPublishGlobally = !isSaving && !isPublishing && !isDiscarding && publishableNodes && (publishableNodes.count() > 0);
const changingWorkspaceAllowed = !canPublishGlobally;
const autoPublishWrapperClassNames = mergeClassNames({
[style.dropDown__item]: true,
Expand Down

0 comments on commit 65517f5

Please sign in to comment.