防止人物缺少圣遗物时出现空指针

This commit is contained in:
lyozaki 2022-06-22 20:17:45 +08:00
parent 586ad4b23b
commit 217b8e99a2
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
{{each artis ds}}
<div class="item arti">
{{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
{{if ds && ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
<div class="avatar">
<img src="{{_res_path}}meta/character/{{ds.avatar}}/side.png" onerror="whenError(this)"/>
</div>

View File

@ -119,7 +119,7 @@
{{each reliquaries ds}}
<div class="item arti">
{{if ds.name }}
{{if ds && ds.name }}
<div class="arti-icon">
<img src="{{_sys_res_path}}/genshin/logo/reliquaries/{{ds.name}}.png"/>
<span>+{{ds.level}}</span>