From faf3164fafc546d4e197d6f0ea7131ff19072191 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Sat, 17 Sep 2022 06:13:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E9=9D=A2=E6=9D=BFbug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/character/profile-stat.js | 2 +- models/ProfileArtis.js | 4 ++-- resources/common/tpl/avatar-card.html | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/character/profile-stat.js b/apps/character/profile-stat.js index 15638f4f..68d61b33 100644 --- a/apps/character/profile-stat.js +++ b/apps/character/profile-stat.js @@ -45,7 +45,7 @@ export async function profileStat (e) { avatarRet.push(avatar) if (profiles[id]) { let profile = profiles[id] - if(profile.hasData) { + if (profile.hasData) { let mark = profiles[id].getArtisMark(false) avatar.artisMark = Data.getData(mark, 'mark,markClass,names') } diff --git a/models/ProfileArtis.js b/models/ProfileArtis.js index 214452ab..acb5a29d 100644 --- a/models/ProfileArtis.js +++ b/models/ProfileArtis.js @@ -70,11 +70,11 @@ export default class ProfileArtis extends Base { } get sets () { - return this.getSetData().sets + return this.getSetData().sets || {} } get names () { - return this.getSetData().names + return this.getSetData().names || [] } mainAttr (idx = '') { diff --git a/resources/common/tpl/avatar-card.html b/resources/common/tpl/avatar-card.html index 6a8e9d3f..eb0fc54c 100644 --- a/resources/common/tpl/avatar-card.html +++ b/resources/common/tpl/avatar-card.html @@ -30,9 +30,9 @@ {{weapon.affix}} -
+
- {{each avatar.names name}} + {{each avatar?.names name}} {{/each}}