🐛 Fix attachments display

This commit is contained in:
LittleSheep 2024-02-05 21:27:19 +08:00
parent 7ab1b128df
commit f8f8c3c3b5

View File

@ -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(() => {