This commit is contained in:
zsviczian 2025-02-04 20:14:31 +01:00 committed by GitHub
parent 021f6d37d4
commit 413f852cf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,8 +108,10 @@ export const isImageFileHandle = (handle: FileSystemHandle | null) => {
};
const getExtensionFromFilename = (filename?: string): string | null => {
if (!filename) return null;
const ext = filename.split('.').pop()?.toLowerCase();
if (!filename) {
return null;
}
const ext = filename.split(".").pop()?.toLowerCase();
return ext || null;
};