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:
parent
bd6fc729e9
commit
73f2866194
@ -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() )
|
||||
|
Loading…
Reference in New Issue
Block a user