Ignore empty answers.

This commit is contained in:
Jonathan Bernard 2020-12-11 15:44:14 -06:00
parent 6a5b1589ef
commit d7b18e8f86

View File

@ -127,13 +127,15 @@
const promptDiv = document.createElement("div");
promptDiv.classList.add('prompt');
promptDiv.innerHTML = FC.transformContent(item.prompt);
newCardDiv.appendChild(promptDiv);
if (item.answer) {
const answerDiv = document.createElement("div");
answerDiv.classList.add('answer');
answerDiv.innerHTML = FC.transformContent(item.answer);
newCardDiv.appendChild(promptDiv);
newCardDiv.appendChild(answerDiv);
}
return newCardDiv;
};