修正面板数据不存在时的报错

This commit is contained in:
yoimiya-kokomi 2022-09-04 12:02:51 +08:00
parent 612af7d267
commit f958455a5b

View File

@ -23,8 +23,6 @@ export async function renderProfile (e, char, mode = 'profile', params = {}) {
}
let profile = Profile.get(uid, char.id)
char = profile.char
if (!profile) {
if (await refresh()) {
return true
@ -38,7 +36,7 @@ export async function renderProfile (e, char, mode = 'profile', params = {}) {
}
return true
}
char = profile.char || char
let a = profile.attr
let c = Format.comma
let p = Format.pct