Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 8, 2018
Merged

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

merged 2 commits into from
Nov 8, 2018

Conversation

glingener
Copy link
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
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