MINOR Don't try to remove editor containers before they exist

This commit is contained in:
Ingo Schommer 2012-04-18 16:54:20 +02:00
parent 7f62ad0f3e
commit f26951c63d

View File

@ -245,8 +245,8 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
// TODO Move to onunmatch for less coupling (once we figure out how to work with detached DOM nodes in TinyMCE)
$('.cms-container').bind('beforestatechange', function() {
self.css('visibility', 'hidden');
ed.getContainer();
if(ed) $(ed).remove();
var container = ed.getInstance() ? ed.getContainer() : null;
if(container && container.length) container.remove();
});
this._super();