Fixed advanced editor not working due to cheatsheet undefined.

STUD-1514
This commit is contained in:
Waheed Ahmed
2014-04-29 18:36:07 +05:00
parent b95966e959
commit a02f3f73cf

View File

@@ -48,7 +48,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
###
onShowXMLButton: (e) =>
e.preventDefault();
@addRemoveCheatsheetCSS()
if @cheatsheet != undefined
@addRemoveCheatsheetCSS()
if @confirmConversionToXml()
@createXMLEditor(MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue()))
# Need to refresh to get line numbers to display properly (and put cursor position to 0)