Ignore empty answers.
This commit is contained in:
parent
6a5b1589ef
commit
d7b18e8f86
@ -127,13 +127,15 @@
|
|||||||
const promptDiv = document.createElement("div");
|
const promptDiv = document.createElement("div");
|
||||||
promptDiv.classList.add('prompt');
|
promptDiv.classList.add('prompt');
|
||||||
promptDiv.innerHTML = FC.transformContent(item.prompt);
|
promptDiv.innerHTML = FC.transformContent(item.prompt);
|
||||||
|
newCardDiv.appendChild(promptDiv);
|
||||||
|
|
||||||
|
if (item.answer) {
|
||||||
const answerDiv = document.createElement("div");
|
const answerDiv = document.createElement("div");
|
||||||
answerDiv.classList.add('answer');
|
answerDiv.classList.add('answer');
|
||||||
answerDiv.innerHTML = FC.transformContent(item.answer);
|
answerDiv.innerHTML = FC.transformContent(item.answer);
|
||||||
|
|
||||||
newCardDiv.appendChild(promptDiv);
|
|
||||||
newCardDiv.appendChild(answerDiv);
|
newCardDiv.appendChild(answerDiv);
|
||||||
|
}
|
||||||
|
|
||||||
return newCardDiv;
|
return newCardDiv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user