🐛 Fixed small errors in editor

This commit is contained in:
Mawoka
2022-12-06 16:57:56 +01:00
parent 394887aff6
commit 21d1de595d
5 changed files with 11 additions and 8 deletions
@@ -16,9 +16,12 @@
answer: '',
image: undefined
};
export let selected_question: number;
export let data: EditorData;
if (!Array.isArray(data.questions[selected_question].answers)) {
data.questions[selected_question].answers = [];
}
try {
if (typeof data.questions[selected_question].answers[0].right === 'boolean') {
data.questions[selected_question].answers = [];