More init checks in HtmlEditorField.js

This commit is contained in:
Ingo Schommer 2012-07-16 23:33:22 +02:00
parent d4b8db27af
commit a033ddf773

View File

@ -283,7 +283,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
onbeforestatechange: function(){
this.css('visibility', 'hidden');
var ed = this.getEditor(), container = ed.getInstance() ? ed.getContainer() : null;
var ed = this.getEditor(), container = (ed && ed.getInstance()) ? ed.getContainer() : null;
if(container && container.length) container.remove();
}
},