Widgets: When checking for errors in Custom HTML widget, pass correct value to `toggleClass()` for Save button.

`toggleClass()` expects a boolean as a second argument, not an integer.

Props iCaleb.
Fixes #42867.
Built from https://develop.svn.wordpress.org/trunk@42457


git-svn-id: http://core.svn.wordpress.org/trunk@42286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-01-15 23:47:47 +00:00
parent 0d23b38fd3
commit 589395347a
3 changed files with 3 additions and 3 deletions

View File

@ -215,7 +215,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* @returns {void}
*/
onUpdateErrorNotice: function onUpdateErrorNotice( errorAnnotations ) {
control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length );
control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length > 0 );
control.updateErrorNotice( errorAnnotations );
}
});

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42453';
$wp_version = '5.0-alpha-42457';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.