From f8f8c3c3b53c74cd6259280ba4094a9e8c582ea5 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 5 Feb 2024 21:27:19 +0800 Subject: [PATCH] :bug: Fix attachments display --- pkg/view/src/components/PostAttachments.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/view/src/components/PostAttachments.tsx b/pkg/view/src/components/PostAttachments.tsx index 0379424..7f59ff8 100644 --- a/pkg/view/src/components/PostAttachments.tsx +++ b/pkg/view/src/components/PostAttachments.tsx @@ -101,7 +101,7 @@ export default function PostAttachments(props: { attachments: any[] }) { } function getUrl(item: any): string { - return item.external_url ?? `/api/attachments/o/${item.file_id}`; + return item.external_url ? item.external_url : `/api/attachments/o/${item.file_id}`; } createEffect(() => {