Fix very benign bug causing an error to appear in the console instead of nothing happening on page refresh for articles without comments

This commit is contained in:
Tissevert 2019-02-19 19:01:51 +01:00
parent 1d348220fa
commit cf1c93fd1e
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ function DomRenderer(modules) {
if(text != undefined) {
article.replaceChild(getDiv(text.innerText), text);
if(key != undefined) {
article.appendChild(modules.comments.get(key)[0]);
modules.comments.get(key).forEach(article.appendChild.bind(article));
}
} else {
console.log('No content found for this article');