Widgets: Check for existence of `wp.customize.state` before attempting to access in Text widget.
Merges [41088] onto 4.8 branch. Amends [40631]. See #35243. Fixes #41361 for 4.8.1. Built from https://develop.svn.wordpress.org/branches/4.8@41089 git-svn-id: http://core.svn.wordpress.org/branches/4.8@40929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
940c2238ec
commit
aef4b48187
|
@ -285,7 +285,7 @@ wp.textWidgets = ( function( $ ) {
|
|||
* having to make server round-trips to call the respective WP_Widget::update()
|
||||
* 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 );
|
||||
_.delay( function() {
|
||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() - 1 );
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue