Skip to content

Commit

Permalink
Fix regression on paste on FileInput (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith authored Nov 18, 2024
2 parents b6bcc37 + 3b918e6 commit 4eb3e46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/lib/components/Forms/FileInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
const [mainType, preciseType] = mimeType.toLocaleLowerCase().split('/');
const shortPreciseType = getShortenPreciseType(preciseType);
if (mainType === 'image' && allowedExtensions.has(shortPreciseType)) return shortPreciseType;
if (
mainType === 'image' &&
(allowedExtensions === '*' || allowedExtensions.includes(shortPreciseType))
)
return shortPreciseType;
return null;
}
Expand Down

0 comments on commit 4eb3e46

Please sign in to comment.