Web REPL: ensure we only try to append to DOM Elements, not text nodes

This commit is contained in:
Brian Carroll 2022-10-06 08:22:08 +01:00
parent a5a984ca45
commit 76a8a60547
No known key found for this signature in database
GPG Key ID: 9CF4E3BF9C4722C7

View File

@ -212,7 +212,7 @@ function updateHistoryEntry(index, ok, outputText) {
outputElem.classList.add("output");
outputElem.classList.add(ok ? "output-ok" : "output-error");
const historyItem = repl.elemHistory.childNodes[index];
const historyItem = repl.elemHistory.children[index];
historyItem.appendChild(outputElem);
repl.elemHistory.scrollTop = repl.elemHistory.scrollHeight;