MDL-60817 file: Populate header only if exists
[moodle.git] / lib / form / filemanager.js
index 950a002..b3ebb6e 100644 (file)
@@ -875,7 +875,9 @@ M.form_filemanager.init = function(Y, options) {
                 node.one('.fp-dlg-butcancel').on('click', handle_cancel, this);
             }
             this.confirm_dlg.dlgopt = dialog_options;
-            this.confirm_dlg.set('headerContent', dialog_options.header);
+            if (typeof dialog_options.header != 'undefined') {
+                this.confirm_dlg.set('headerContent', dialog_options.header);
+            }
             this.confirm_dlg_node.one('.fp-dlg-text').setContent(dialog_options.message);
             this.confirm_dlg.show();
         },