Add missing json parse statement to load data (sorry, totally forgot)
This commit is contained in:
parent
d497495664
commit
7ca8fa85ba
|
@ -10,7 +10,7 @@
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const container = document.getElementById("{{ $id }}");
|
const container = document.getElementById("{{ $id }}");
|
||||||
const choices = {{ $choices }};
|
const choices = JSON.parse(`{{ $choices }}`);
|
||||||
if (!container || !choices) { return; }
|
if (!container || !choices) { return; }
|
||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
img.alt = "{{ $alt }}";
|
img.alt = "{{ $alt }}";
|
||||||
|
|
Reference in New Issue