diff --git a/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js b/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js index 470af78ba83..7e7b9cb6ad2 100644 --- a/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js +++ b/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js @@ -93,9 +93,10 @@ var managefiles = ed.getParam('managefiles', {}); // Get draft area id from filepicker options. - if (!managefiles.itemid && M.editor_tinymce.filepicker_options - && M.editor_tinymce.filepicker_options[ed.id] - && M.editor_tinymce.filepicker_options[ed.id].image) { + if (!managefiles.itemid && M.editor_tinymce.filepicker_options + && M.editor_tinymce.filepicker_options[ed.id] + && M.editor_tinymce.filepicker_options[ed.id].image + && M.editor_tinymce.filepicker_options[ed.id].image.itemid) { managefiles.itemid = M.editor_tinymce.filepicker_options[ed.id].image.itemid; ed.settings['managefiles'].itemid = managefiles.itemid; }