Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions packages/editor/src/components/post-publish-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,22 @@
onToggle,
visibility,
hasNonPostEntityChanges,
isSavingNonPostEntityChanges,

Check failure on line 98 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

'isSavingNonPostEntityChanges' is assigned a value but never used.
postStatus,
postStatusHasChanged,
} = this.props;

const isButtonDisabled =
isPostSavingLocked ||
( ( isSaving ||
! isSaveable ||
( ! isPublishable && ! forceIsDirty ) ) &&
( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
isPostSavingLocked ||

Check failure on line 104 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Insert `↹↹`
isSaving ||

Check failure on line 105 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Insert `↹↹`
!isSaveable ||

Check failure on line 106 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Replace `↹!` with `↹↹↹!·`
( !isPublishable && !forceIsDirty );

Check failure on line 107 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Replace `↹(·!isPublishable·&&·!` with `↹↹↹(·!·isPublishable·&&·!·`

const isToggleDisabled =
isPostSavingLocked ||
( ( isPublished ||
isSaving ||
! isSaveable ||
( ! isPublishable && ! forceIsDirty ) ) &&
( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
isPostSavingLocked ||

Check failure on line 110 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Insert `↹↹`
isSaving ||

Check failure on line 111 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Insert `↹↹`
!isSaveable ||

Check failure on line 112 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Replace `↹!` with `↹↹↹!·`
( !isPublishable && !forceIsDirty );

Check failure on line 113 in packages/editor/src/components/post-publish-button/index.js

View workflow job for this annotation

GitHub Actions / All (Node.js 24 on Linux)

Replace `↹(·!isPublishable·&&·!` with `↹↹↹(·!·isPublishable·&&·!·`

// If the new status has not changed explicitly, we derive it from
// other factors, like having a publish action, etc.. We need to preserve
Expand Down
Loading