summaryrefslogtreecommitdiff
path: root/data/js
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-06-21 12:54:07 +0200
committerYorhel <git@yorhel.nl>2019-06-21 12:54:09 +0200
commit940c8dc80bcfbd4dea0f286032b00873e31daac4 (patch)
tree242467062f20676ed238b533daae35f01d9784ba /data/js
parent7156e7c8dbc414a4a710a64275c830aa0edd0bce (diff)
JS: Fix charops throwing an exception when there is no spoiler radio thing
Fixes https://vndb.org/t12492.1
Diffstat (limited to 'data/js')
-rw-r--r--data/js/charops.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/js/charops.js b/data/js/charops.js
index 02c8a75c..9478ca95 100644
--- a/data/js/charops.js
+++ b/data/js/charops.js
@@ -49,11 +49,16 @@ function setall() {
function init() {
var opsParent = byId('charops');
+ if(!opsParent)
+ return;
+
t = byClass('table', 'stripe');
// Spoiler level
for(var i=0; i<3; i++) {
var splChk = byClass(opsParent, 'radio_spoil' + i)[0];
+ if(!splChk)
+ continue;
splChk.num = i;
splChk.onchange = function() {