Widgets: Check for existence of wp.customize.state
before attempting to access in Text widget.
Amends [40631]. See #35243. Fixes #41361 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@41088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c941da4468
commit
af66f0b03e
@ -285,7 +285,7 @@ wp.textWidgets = ( function( $ ) {
|
|||||||
* having to make server round-trips to call the respective WP_Widget::update()
|
* having to make server round-trips to call the respective WP_Widget::update()
|
||||||
* callbacks. See <https://core.trac.wordpress.org/ticket/33507>.
|
* callbacks. See <https://core.trac.wordpress.org/ticket/33507>.
|
||||||
*/
|
*/
|
||||||
if ( wp.customize ) {
|
if ( wp.customize && wp.customize.state ) {
|
||||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() + 1 );
|
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() + 1 );
|
||||||
_.delay( function() {
|
_.delay( function() {
|
||||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() - 1 );
|
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() - 1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user