summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrockfanning2017-08-08 04:51:38 (GMT)
committerolstjos2017-08-08 04:52:21 (GMT)
commita10ef32fe7bb02f5ae6f0d6b297034b346413b2c (patch)
tree6aa49b128ea20e2133adb84ba734b9cd27dca589
parentc4844bca974ab18e646e22bb59077518a9454692 (diff)
Issue #2885412 by joseph.olstad, brockfanning: Javascript error after media upload: Cannot read property 'selectedMedia' of undefined
-rw-r--r--js/media.popups.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/media.popups.js b/js/media.popups.js
index c8cf2a0..d7d7d0d 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;
}