🚨 尝试修复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

@@ -245,7 +245,7 @@ onMounted(async () => {
}
postData.value = resp;
console.log(resp);
isLike.value = postData.value.self_operation.upvote_type !== 0;
isLike.value = (postData.value.self_operation?.upvote_type ?? 0) > 0;
await showLoading.update("正在渲染数据");
renderPost.value = await getRenderPost(postData.value);
await webviewWindow