{#if Array.isArray(data.questions[selected_question].answers)} {#each data.questions[selected_question].answers as answer, index}
{ data.questions[selected_question].answers.splice(index, 1); data.questions[selected_question].answers = data.questions[selected_question].answers; }} >
{ answer.right = !answer.right; }} > {#if answer.right}
{:else}
{/if}
{ answer.color = default_colors[index]; })} />
{/each} {/if} {#if data.questions[selected_question].answers.length < 4}
{ data.questions[selected_question].answers = [ ...data.questions[selected_question].answers, { ...get_empty_answer(data.questions[selected_question].answers.length) } ]; }} >
{$t('editor_page.add_an_answer')}
{/if}