From 884fa6476ec6eb29728a5978c72edfdda59d9dba Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 2 Nov 2017 19:26:23 +0000 Subject: [PATCH] Customize: Prevent `history.replaceState()` and `history.pushState()` calls from causing error in customize preview before DOM ready. Amends [41597]. See #39896. Fixes #42414. git-svn-id: https://develop.svn.wordpress.org/trunk@42108 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/customize-preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js index c5ea964461..684837576f 100644 --- a/src/wp-includes/js/customize-preview.js +++ b/src/wp-includes/js/customize-preview.js @@ -36,7 +36,7 @@ newQueryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) ); newQueryParams.customize_changeset_uuid = oldQueryParams.customize_changeset_uuid; - if ( api.settings.changeset.autosaved ) { + if ( oldQueryParams.customize_autosaved ) { newQueryParams.customize_autosaved = 'on'; } if ( oldQueryParams.customize_theme ) {