Commit 749c2a52 authored by Bruno Burke's avatar Bruno Burke 😁

fix bug: code-editor with nil language

parent 17f06b07
Pipeline #45383 passed with stages
in 1 minute and 43 seconds
......@@ -7,12 +7,13 @@
(defn get-codemirror-mode [language]
(case (name language)
"python2" "python"
"python3" "python"
"common-lisp" "commonlisp"
"c" "text/x-csrc"
(name language)))
(let [language (or language "python")]
(case (name language)
"python2" "python"
"python3" "python"
"common-lisp" "commonlisp"
"c" "text/x-csrc"
(name language))))
(defn code-editor [{:keys [code language on-change cm-editor-id]}]
(let [cm-atom (atom nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment