Skip to content

Commit

Permalink
fix some user's latent build-in method err
Browse files Browse the repository at this point in the history
  • Loading branch information
snowtafir committed Aug 18, 2024
1 parent bf003e6 commit f757022
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/bilibili.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ export default class YukiBili extends plugin {
return;
}

let name = items.length > 0 ? (items[0].modules.module_author?.name || uid) : uid;
let name: string | number
if (Array.isArray(items)) {
if (items.length > 0) {
name = items[0].modules?.module_author?.name || uid
}
} else {
name = uid;
}

// 添加新的推送数据
subData[chatType][chatId].push({
Expand Down

0 comments on commit f757022

Please sign in to comment.