Commit 9fea0977b3fd2f1ce6182df55b8ccd78e8147663

Authored by Miguel Barão
1 parent a0f5b4b0
Exists in master and in 1 other branch dev

- fixed codemirror submit

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
static/js/topic.js
... ... @@ -59,7 +59,9 @@ function getQuestion() {
59 59 // Send answer and receive a response.
60 60 // The response can be a new_question or a shake if the answer is wrong.
61 61 function postQuestion() {
62   - editor.save();
  62 + if (typeof editor === 'object')
  63 + editor.save();
  64 +
63 65 $.ajax({
64 66 type: "POST",
65 67 url: "/question",
... ...