fix: 过滤无效null类型

This commit is contained in:
手瓜一十雪
2024-08-25 23:50:34 +08:00
parent f6a1b784c4
commit 337ac0eab9

View File

@@ -717,7 +717,7 @@ export class OneBotMsgApi {
const msgSegments = (await Promise.all(msg.elements.map( const msgSegments = (await Promise.all(msg.elements.map(
async (element) => { async (element) => {
for (const key in element) { for (const key in element) {
if (keyCanBeParsed(key, this.rawToOb11Converters)) { if (keyCanBeParsed(key, this.rawToOb11Converters) && this.rawToOb11Converters[key]) {
return await this.rawToOb11Converters[key]?.( return await this.rawToOb11Converters[key]?.(
// eslint-disable-next-line // eslint-disable-next-line
// @ts-ignore // @ts-ignore