Skip to content

Commit 1295b09

Browse files
committed
fix: fix the issue where the comment_id parameter is forcibly converted to a string, causing a 500 error in the PostgreSQL database interface. #1426
1 parent 20cd4d7 commit 1295b09

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ui/src/components/Comment/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import './index.scss';
5353
interface IProps {
5454
objectId: string;
5555
mode?: 'answer' | 'question';
56-
commentId?: string;
56+
commentId?: string | null;
5757
children?: React.ReactNode;
5858
}
5959

ui/src/pages/Questions/Detail/components/Answer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const Index: FC<Props> = ({
169169
<Comment
170170
objectId={data.id}
171171
mode="answer"
172-
commentId={String(searchParams.get('commentId'))}>
172+
commentId={searchParams.get('commentId')}>
173173
<Operate
174174
qid={data.question_id}
175175
aid={data.id}

ui/src/pages/Questions/Detail/components/Question/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {
189189
<Comment
190190
objectId={data?.id}
191191
mode="question"
192-
commentId={String(searchParams.get('commentId'))}>
192+
commentId={searchParams.get('commentId')}>
193193
<Operate
194194
qid={data?.id}
195195
type="question"

0 commit comments

Comments
 (0)