Fix broken image when editing comment with non-image attachments (#32319) (#32345)

Backport #32319 

Fix #32316

---------

Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
Lunny Xiao 2024-11-01 22:34:09 -07:00 committed by GitHub
parent 898f852d03
commit a3b7b98336
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -45,3 +45,7 @@ export async function imageInfo(blob) {
return {width, dppx};
}
export function isImageFile(name) {
return /\.(jpe?g|png|gif|webp|svg|heic)$/i.test(name);
}