diff --git a/js/entity_browser.modal.js b/js/entity_browser.modal.js
index fd9c231..6ee5649 100644
--- a/js/entity_browser.modal.js
+++ b/js/entity_browser.modal.js
@@ -94,7 +94,7 @@
       var $this = $(this);
       var dialog = $this.find('.ui-dialog-content').data('ui-dialog');
       // If fluid option == true.
-      if (dialog.options.fluid) {
+      if (typeof dialog !== 'undefined' && dialog.options.fluid) {
         var wWidth = $(window).width();
         // Check window width against dialog width.
         if (dialog.options.maxWidth && (wWidth > parseInt(dialog.options.maxWidth) + 50)) {
