From 287e2a34dba279baedf31c558ef2910ee4d63266 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 6 Aug 2013 20:59:21 +1000 Subject: [PATCH] MDL-41034 Additional check to be extra sure that no JS error occurs --- .../tinymce/plugins/managefiles/tinymce/editor_plugin.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; }