i broke single-image nsfw posts again :(

This commit is contained in:
Rhiannon Morris 2020-08-16 20:33:19 +02:00
parent a73271c0b5
commit cd0e444d16

View file

@ -82,7 +82,9 @@ function setup() {
mainfig = document.getElementById('mainfig');
mainimg = document.getElementById('mainimg');
mainlink = document.getElementById('mainlink');
altButtons = document.getElementById('alts').getElementsByTagName('input');
let alts = document.getElementById('alts');
altButtons = alts ? Array.from(alts.getElementsByTagName('input')) : [];
for (let button of altButtons) {
button.onchange = e => { if (button.checked) activateButton(button); };