diff --git a/src/wp-includes/js/customize-base.js b/src/wp-includes/js/customize-base.js index 79ba46430a..b4b727951c 100644 --- a/src/wp-includes/js/customize-base.js +++ b/src/wp-includes/js/customize-base.js @@ -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() )