🚨 尝试修复Sentry报错

Cannot read properties of undefined (reading 'upvote_type')
This commit is contained in:
BTMuli
2026-03-11 11:26:55 +08:00
parent d30a70d4aa
commit 9f707db9f7
3 changed files with 5 additions and 5 deletions

View File

@@ -226,7 +226,7 @@ async function tryAuto(skip: boolean = false): Promise<void> {
}
viewCnt++;
if (likeCnt < 5) {
const isLike = detailResp.self_operation.upvote_type === 1;
const isLike = (detailResp.self_operation?.upvote_type ?? 0) > 0;
if (isLike) {
await TGLogger.Script(`[米游币任务]帖子${post.post.post_id}已点赞,跳过`);
continue;