diff --git a/static/js/topic.js b/static/js/topic.js index 3fcdaeb..ecaab71 100644 --- a/static/js/topic.js +++ b/static/js/topic.js @@ -59,7 +59,9 @@ function getQuestion() { // Send answer and receive a response. // The response can be a new_question or a shake if the answer is wrong. function postQuestion() { - editor.save(); + if (typeof editor === 'object') + editor.save(); + $.ajax({ type: "POST", url: "/question", -- libgit2 0.21.2