Add missing JSON.parse, proper random id generation and more images #34
|
@ -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 }}";
|
||||
|
|
Reference in New Issue