Permalink
Browse files

More init checks in HtmlEditorField.js

  • Loading branch information...
1 parent d4b8db2 commit a033ddf7735a61e77b1b6abe627c47d6197050ba @chillu chillu committed Jul 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 javascript/HtmlEditorField.js
View
2 javascript/HtmlEditorField.js
@@ -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();
}
},

0 comments on commit a033ddf

Please sign in to comment.