diff options
author | Yorhel <git@yorhel.nl> | 2015-10-03 10:29:17 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-10-03 10:29:17 +0200 |
commit | f81d7164cffa5067b25b941f1ab6498a8eb5bfb0 (patch) | |
tree | 7750829f2fa7d4561685385702c5df3f02b33f5c | |
parent | b75eff0f2cce2050c98ec946aac28b390020fdc5 (diff) |
js: Minor fixes
-rw-r--r-- | data/js/vnscr.js | 2 | ||||
-rw-r--r-- | data/js/vnstaff.js | 2 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNEdit.pm | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/data/js/vnscr.js b/data/js/vnscr.js index 21b1ba74..acde013d 100644 --- a/data/js/vnscr.js +++ b/data/js/vnscr.js @@ -199,5 +199,5 @@ function upload() { return false; } -if(byId('jt_box_vn_scr')) +if(byId('jt_box_vn_scr') && byId('screenshots')) init(); diff --git a/data/js/vnstaff.js b/data/js/vnstaff.js index e707d7f2..2a9990d1 100644 --- a/data/js/vnstaff.js +++ b/data/js/vnstaff.js @@ -4,7 +4,7 @@ window.vnsStaffData = {}; function vnsLoad() { - window.vnsStaffData = jsonParse(getText(byId('staffdata')||{})) || {}; + window.vnsStaffData = jsonParse(getText(byId('staffdata'))) || {}; var credits = jsonParse(byId('credits').value) || []; for(var i = 0; i < credits.length; i++) { var aid = credits[i].aid; diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm index e0a6643e..6827557d 100644 --- a/lib/VNDB/Handler/VNEdit.pm +++ b/lib/VNDB/Handler/VNEdit.pm @@ -324,7 +324,7 @@ sub _form { for my $c (@{$v->{credits}}, @{$v->{seiyuu}}) { $staff_data{$c->{aid}} //= { map +($_ => $c->{$_}), qw|id aid name| }; } - script_json staffdata => \%staff_data if %staff_data; + script_json staffdata => \%staff_data; div class => 'warning'; lit mt '_vnedit_staff_msg'; |