mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
修正无数据时可能触发面板计算导致的报错
This commit is contained in:
parent
1a92456166
commit
75e63b0894
@ -21,7 +21,7 @@ export default class ProfileData extends Base {
|
||||
ds.talent && this.setTalent(ds.talent)
|
||||
this.artis = new ProfileArtis(this.id, this.elem)
|
||||
ds.artis && this.setArtis(ds.artis)
|
||||
if (Cfg.get('attrCalc')) {
|
||||
if (Cfg.get('attrCalc') && this.hasData) {
|
||||
this._attr = AttrCalc.create(this)
|
||||
this.attr = this._attr.calc()
|
||||
this._attrCalc = true
|
||||
@ -89,17 +89,17 @@ export default class ProfileData extends Base {
|
||||
if (!this.dataSource || !['enka', 'input2', 'miao', 'miao-pre'].includes(this.dataSource)) {
|
||||
return false
|
||||
}
|
||||
// 检查旅行者
|
||||
if (['空', '荧'].includes(this.name)) {
|
||||
return !!this.elem
|
||||
}
|
||||
// 检查属性
|
||||
if (!this.weapon || !this.attr || !this.talent || !this.artis) {
|
||||
if (!this.weapon || !this.talent || !this.artis) {
|
||||
return false
|
||||
}
|
||||
if (this.dataSource === 'miao-pre') {
|
||||
this.dataSource = 'miao'
|
||||
}
|
||||
// 检查旅行者
|
||||
if (['空', '荧'].includes(this.name)) {
|
||||
return !!this.elem
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user