diff --git a/js/media.popups.js b/js/media.popups.js index c8cf2a0a16ca2a55eb420ef70f9818cdba403c4c..d7d7d0dcd207d251b38714ca044eff5f70fcbae2 100644 --- a/js/media.popups.js +++ b/js/media.popups.js @@ -128,7 +128,8 @@ Drupal.media.popups.mediaBrowser.mediaBrowserOnLoad = function (e) { var options = e.data; // Ensure that the iFrame is defined. - if (this.contentWindow.Drupal.media == undefined) { + if (typeof this.contentWindow.Drupal.media === 'undefined' || typeof + this.contentWindow.Drupal.media.browser === 'undefined') { return; }