修复播放页500错误

This commit is contained in:
mtvpls
2025-12-03 20:21:44 +08:00
parent 4e05c7bcaa
commit a2b7dff392
9 changed files with 125 additions and 72 deletions

View File

@@ -34,11 +34,6 @@ export default function DoubanComments({ doubanId }: DoubanCommentsProps) {
const enableComments = useEnableComments();
// 如果评论功能被禁用,不显示任何内容
if (!enableComments) {
return null;
}
const fetchComments = useCallback(async (startIndex: number) => {
try {
console.log('正在获取评论,起始位置:', startIndex);
@@ -129,6 +124,11 @@ export default function DoubanComments({ doubanId }: DoubanCommentsProps) {
);
};
// 如果评论功能被禁用,不显示任何内容
if (!enableComments) {
return null;
}
// 初始状态:显示查看评论按钮
if (!hasStartedLoading) {
return (