Customize: Run a partial's fallback behavior (full refresh) when selective refresh fails due to a script error.

This ensures that 3rd-party scripts that users paste into Text widgets will gracefully recover and result in the expected preview.

See #27355.
Fixes #40658.


git-svn-id: https://develop.svn.wordpress.org/trunk@40771 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-05-17 00:00:26 +00:00
parent 8b07508cae
commit 4dc737ca8e
1 changed files with 1 additions and 0 deletions

View File

@ -457,6 +457,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
if ( 'undefined' !== typeof console && console.error ) {
console.error( partial.id, error );
}
partial.fallback( error, [ placement ] );
}
/* jshint ignore:start */
document.write = self.orginalDocumentWrite;