Skip to content

Commit

Permalink
BUGFIX: don't allow to publish/discard while publishing/discarding/sa…
Browse files Browse the repository at this point in the history
…ving
  • Loading branch information
dimaip committed Mar 30, 2018
1 parent 1f5b705 commit c89890e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default class PublishDropDown extends PureComponent {
publishableNodes,
publishableNodesInDocument,
isSaving,
isPublishing,
isAutoPublishingEnabled,
isWorkspaceReadOnly,
toggleAutoPublishing,
Expand All @@ -102,8 +103,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 && publishableNodesInDocument && (publishableNodesInDocument.count() > 0);
const canPublishGlobally = !isSaving && !isPublishing && publishableNodes && (publishableNodes.count() > 0);
const changingWorkspaceAllowed = !canPublishGlobally;
const autoPublishWrapperClassNames = mergeClassNames({
[style.dropDown__item]: true,
Expand Down

0 comments on commit c89890e

Please sign in to comment.