Commit 4ebfe720 authored by Bady's avatar Bady
Browse files

Fix condition to update leaves

parent 12f2888a
......@@ -498,12 +498,13 @@
knowledgeItem.setAttribute("class", "knowledge-item");
let knowledgeId = activeLeaf.id.replace("path", "knowledge");
leafData = document.getElementById(knowledgeId);
if(!leafData) {
if(leafData) {
leafData.innerHTML = leafdata.leaftext;
} else {
knowledgeItem.setAttribute("id", knowledgeId);
knowledgeItem.innerHTML = leafdata.leaftext;
document.getElementById("knowledge").appendChild(knowledgeItem);
}
leafData.innerHTML = leafdata.leaftext;
});
function popupLeaf() {
......
Supports Markdown
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