This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git
The following commit(s) were added to refs/heads/test by this push:
new 1295b09e 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
1295b09e is described below
commit 1295b09ecb5fed16a6fba43204adbf9e4c71588b
Author: shuai <[email protected]>
AuthorDate: Tue Nov 18 10:55:11 2025 +0800
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
---
ui/src/components/Comment/index.tsx | 2 +-
ui/src/pages/Questions/Detail/components/Answer/index.tsx | 2 +-
ui/src/pages/Questions/Detail/components/Question/index.tsx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/src/components/Comment/index.tsx
b/ui/src/components/Comment/index.tsx
index ec42c562..af2ddbd4 100644
--- a/ui/src/components/Comment/index.tsx
+++ b/ui/src/components/Comment/index.tsx
@@ -53,7 +53,7 @@ import './index.scss';
interface IProps {
objectId: string;
mode?: 'answer' | 'question';
- commentId?: string;
+ commentId?: string | null;
children?: React.ReactNode;
}
diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx
b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
index 957a60df..bd0ecbb5 100644
--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
@@ -169,7 +169,7 @@ const Index: FC<Props> = ({
<Comment
objectId={data.id}
mode="answer"
- commentId={String(searchParams.get('commentId'))}>
+ commentId={searchParams.get('commentId')}>
<Operate
qid={data.question_id}
aid={data.id}
diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx
b/ui/src/pages/Questions/Detail/components/Question/index.tsx
index 149cd850..f13fa31d 100644
--- a/ui/src/pages/Questions/Detail/components/Question/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx
@@ -189,7 +189,7 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer,
isLogged }) => {
<Comment
objectId={data?.id}
mode="question"
- commentId={String(searchParams.get('commentId'))}>
+ commentId={searchParams.get('commentId')}>
<Operate
qid={data?.id}
type="question"