mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
修正服务未返回武器数据时导致的图鉴报错
This commit is contained in:
parent
95300486fc
commit
72c63c7ab9
@ -28,11 +28,13 @@ let CharWiki = {
|
||||
let weapons = []
|
||||
if (wu[id]) {
|
||||
lodash.forEach(wu[id], (ds) => {
|
||||
let weapon = Weapon.get(ds.name) || {}
|
||||
let weapon = Weapon.get(ds.name)
|
||||
if (weapon) {
|
||||
weapons.push({
|
||||
...weapon.getData('name,abbr,img,star'),
|
||||
value: ds.value
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
weapons = lodash.sortBy(weapons, 'value')
|
||||
|
Loading…
Reference in New Issue
Block a user