yoimiya-kokomi / miao-plugin

Miao-Plugin for Yunzai-Bot
MIT License
1.43k stars 212 forks source link

乱破面板无法显示,其他角色正常。 #821

Closed TheTychoStar closed 2 weeks ago

TheTychoStar commented 3 weeks ago

其他角色都可以正常显示,唯独乱破面板报错,求教如何解决。

错误日志如下:

0|TRSS-Yun | [23:14:08.954][ERRO][][#乱破面板][喵喵:角色面板(profileDetail)] TypeError: tree.includes is not a function 0|TRSS-Yun | at file:///home/ec2-user/trss/plugins/miao-plugin/models/avatar/ProfileAvatar.js:84:19 0|TRSS-Yun | at arrayEach (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:530:11) 0|TRSS-Yun | at Function.forEach (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:9410:14) 0|TRSS-Yun | at Object.getCostumeSplash (file:///home/ec2-user/trss/plugins/miao-plugin/models/avatar/ProfileAvatar.js:83:14) 0|TRSS-Yun | at get costumeSplash (file:///home/ec2-user/trss/plugins/miao-plugin/models/Avatar.js:113:26) 0|TRSS-Yun | at Reflect.get () 0|TRSS-Yun | at Object.get (file:///home/ec2-user/trss/plugins/miao-plugin/models/Base.js:22:26) 0|TRSS-Yun | at baseGet (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:3077:24) 0|TRSS-Yun | at Function.get (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:13195:49) 0|TRSS-Yun | at Object.getVal (file:///home/ec2-user/trss/plugins/miao-plugin/components/Data.js:205:19) { 0|TRSS-Yun | [stack]: 'TypeError: tree.includes is not a function\n' + 0|TRSS-Yun | ' at file:///home/ec2-user/trss/plugins/miao-plugin/models/avatar/ProfileAvatar.js:84:19\n' + 0|TRSS-Yun | ' at arrayEach (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:530:11)\n' + 0|TRSS-Yun | ' at Function.forEach (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:9410:14)\n' + 0|TRSS-Yun | ' at Object.getCostumeSplash (file:///home/ec2-user/trss/plugins/miao-plugin/models/avatar/ProfileAvatar.js:83:14)\n' + 0|TRSS-Yun | ' at get costumeSplash (file:///home/ec2-user/trss/plugins/miao-plugin/models/Avatar.js:113:26)\n' + 0|TRSS-Yun | ' at Reflect.get ()\n' + 0|TRSS-Yun | ' at Object.get (file:///home/ec2-user/trss/plugins/miao-plugin/models/Base.js:22:26)\n' + 0|TRSS-Yun | ' at baseGet (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:3077:24)\n' + 0|TRSS-Yun | ' at Function.get (/home/ec2-user/trss/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js:13195:49)\n' + 0|TRSS-Yun | ' at Object.getVal (file:///home/ec2-user/trss/plugins/miao-plugin/component'... 17 more characters, 0|TRSS-Yun | [message]: 'tree.includes is not a function'

OMGLogic commented 3 weeks ago

我也有这个报错,根据报错信息,我目前的解决方法是将云崽根目录/plugins/miao-plugin/models/avatar/ProfileAvatar.js文件下的第84行,也就是 if (!tree.includes(treeSet[idx])) { treeSuper = false } 这段代码注释掉,注释掉之后就可以正常查询了,但我不清楚注释这段会不会有其他什么问题,建议修改前先备份一下,然后等更新……

TheTychoStar commented 3 weeks ago

我也有这个报错,根据报错信息,我目前的解决方法是将云崽根目录/plugins/miao-plugin/models/avatar/ProfileAvatar.js文件下的第84行,也就是 if (!tree.includes(treeSet[idx])) { treeSuper = false } 这段代码注释掉,注释掉之后就可以正常查询了,但我不清楚注释这段会不会有其他什么问题,建议修改前先备份一下,然后等更新……

感谢,试了下可以了,先这样临时凑合着吧,最新的更新好像也没修复这个问题。

iona-s commented 3 weeks ago

好像是乱破技能树数据有一项写入保存json文件时成了number,正常应该是string?这里判断技能树有没有点满就报错了

TheTychoStar commented 2 weeks ago

11.3的更新(59c9c5)已经修复了这个问题,我关闭issue了。