Don't fail TinyMCE cleanup if no current instance is set

Bug has been observed in IE8
This commit is contained in:
Ingo Schommer 2013-03-20 14:46:28 +01:00
parent eb9a8d6e6e
commit 8bedf485d6

View File

@ -1360,7 +1360,7 @@ function sapphiremce_cleanup(type, value) {
// if we are inserting from a popup back into the editor
// add the changed class and update the Content value
if(type == 'insert_to_editor') {
if(type == 'insert_to_editor' && typeof tinyMCE.selectedInstance.editorId !== 'undefined') {
var field = jQuery('#' + tinyMCE.selectedInstance.editorId);
var original = field.val();
if (original != value) {