Fixed incorrect errors handling

This commit is contained in:
jeluard 2018-09-28 12:44:14 +02:00
parent b8de1d9df6
commit 0d5136e5b6

View File

@ -45,7 +45,7 @@
function clearErrors() {
const el = document.getElementById("errors");
el.innerHTML = '';
el.classList.className = "";
el.className = "";
}
function displayErrors(errors) {
@ -99,6 +99,7 @@
`;
var cm = CodeMirror(document.getElementById("content"));
cm.on("change", function(c, change) {
clearErrors();
const read = pluto.reader.read(cm.getValue());
const readJS = pluto.js.from_clj(read);
displayErrors(readJS.errors);