Skip to content

Commit 888e873

Browse files
committed
fix: answer the author's conditional judgement
1 parent 487b454 commit 888e873

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ const Index = () => {
8080
res.list = res.list?.filter((v) => {
8181
// delete answers pnly show to author and admin and has searchparams aid
8282
if (v.status === 10) {
83-
if ((isAuthor || isAdmin) && aid === v.id) {
83+
if (
84+
(v?.user_info.username === userInfo?.username || isAdmin) &&
85+
aid === v.id
86+
) {
8487
return v;
8588
}
8689
return null;

0 commit comments

Comments
 (0)