Add missing json parse statement to load data (sorry, totally forgot)

This commit is contained in:
sixtus 2022-02-26 22:13:33 +01:00
parent d497495664
commit 7ca8fa85ba
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@
<script>
document.addEventListener("DOMContentLoaded", function() {
const container = document.getElementById("{{ $id }}");
const choices = {{ $choices }};
const choices = JSON.parse(`{{ $choices }}`);
if (!container || !choices) { return; }
const img = document.createElement("img");
img.alt = "{{ $alt }}";