From dacdc4a46756c101d1f925e80aa21599add8728b Mon Sep 17 00:00:00 2001 From: Peter Dias Date: Thu, 19 Mar 2020 12:00:03 +0800 Subject: [PATCH] MDL-60817 file: Populate header only if exists --- lib/form/filemanager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/form/filemanager.js b/lib/form/filemanager.js index 950a0026c3c..b3ebb6ea4af 100644 --- a/lib/form/filemanager.js +++ b/lib/form/filemanager.js @@ -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(); }, -- 2.43.0