From a02f3f73cf9567f5080d30aa230826072bfc9bc7 Mon Sep 17 00:00:00 2001 From: Waheed Ahmed Date: Tue, 29 Apr 2014 18:36:07 +0500 Subject: [PATCH] Fixed advanced editor not working due to cheatsheet undefined. STUD-1514 --- common/lib/xmodule/xmodule/js/src/problem/edit.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index 29e95dade5f8..0bc9d39b18c3 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -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)