mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 17:11:17 -08:00
fix embed crash
This commit is contained in:
1 parent
04892f5136
commit
662c36d409
2 files changed
+9
-4
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Fix crash with some embed links.
|
||||
@@ -83,7 +83,7 @@ type RenderImageProps = {
|
||||
tabIndex: number;
|
||||
};
|
||||
export type ImageContentProps = {
|
||||
body: string;
|
||||
body?: string;
|
||||
mimeType?: string;
|
||||
url: string;
|
||||
info?: IImageInfo;
|
||||
@@ -141,9 +141,9 @@ export const ImageContent = as<'div', ImageContentProps>(
|
||||
info?.mimetype === 'image/gif' ||
|
||||
info?.mimetype === 'image/apng' ||
|
||||
info?.mimetype === 'image/webp' ||
|
||||
body.toLowerCase().endsWith('.gif') ||
|
||||
body.toLowerCase().endsWith('.apng') ||
|
||||
body.toLowerCase().endsWith('.webp') ||
|
||||
(body ?? '').toLowerCase().endsWith('.gif') ||
|
||||
(body ?? '').toLowerCase().endsWith('.apng') ||
|
||||
(body ?? '').toLowerCase().endsWith('.webp') ||
|
||||
url.toLowerCase().endsWith('.gif') ||
|
||||
url.toLowerCase().endsWith('.apng') ||
|
||||
url.toLowerCase().endsWith('.webp');
|
||||
|
||||
Reference in new issue
Block a user