Skip to content

Commit 6ed8ca2

Browse files
Little-King2022gary-Shen
authored andcommitted
fix: make file extension check case-insensitive in isCorrectFileType
1 parent a2159af commit 6ed8ca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/frontend/src/utils/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const commonController = {
118118
const correctType = FileExtension[type];
119119
const dotIndex = fileName.lastIndexOf('.');
120120
if (dotIndex > -1) {
121-
const _type = fileName.slice(dotIndex + 1);
121+
const _type = fileName.slice(dotIndex + 1).toLowerCase();
122122
if (correctType.indexOf(_type) > -1) {
123123
result = true;
124124
}

0 commit comments

Comments
 (0)