Skip to content

Fix save lock control (length check on object)#11636

Merged
aduth merged 2 commits into
WordPress:masterfrom
glingener:fix/save-lock-control
Nov 8, 2018
Merged

Fix save lock control (length check on object)#11636
aduth merged 2 commits into
WordPress:masterfrom
glingener:fix/save-lock-control

Conversation

@glingener
Copy link
Copy Markdown
Contributor

Description

Tried to use #10649 and found a little glitch using .length on an object, which broke the whole feature.

How has this been tested?

Using wp.data.dispatch( 'core/editor' ).lockPostSaving( 'mylock' );
to lock the publish/update button

And wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );
to unlock it.

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@aduth aduth added the [Feature] Saving Related to saving functionality label Nov 8, 2018
Copy link
Copy Markdown
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks. I pushed updated tests in cfdc3b7, as the previous ones were obviously insufficient in capturing the original issue.

@ocean90 ocean90 added this to the 4.3 milestone Nov 8, 2018
@aduth aduth merged commit 4369d93 into WordPress:master Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Saving Related to saving functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants