Customize: Prevent consecutive `refresh` requests from preview from causing JS error.

Fixes "Uncaught TypeError: this.targetWindow is not a function".

See #27355.
Fixes #35866.


git-svn-id: https://develop.svn.wordpress.org/trunk@36583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2016-02-19 03:46:59 +00:00
parent bd6fc729e9
commit 73f2866194
1 changed files with 2 additions and 1 deletions

View File

@ -704,8 +704,9 @@ window.wp = window.wp || {};
event = event.originalEvent;
if ( ! this.targetWindow() )
if ( ! this.targetWindow || ! this.targetWindow() ) {
return;
}
// Check to make sure the origin is valid.
if ( this.origin() && event.origin !== this.origin() )