mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@42457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user