We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a27556 commit e2906daCopy full SHA for e2906da
1 file changed
app/utils/file-types.ts
@@ -65,6 +65,7 @@ const BINARY_EXTENSIONS = new Set([
65
])
66
67
export function isBinaryFilePath(filePath: string): boolean {
68
- const ext = filePath.split('.').pop()?.toLowerCase() ?? ''
+ const dotIndex = filePath.lastIndexOf('.')
69
+ const ext = dotIndex > -1 ? filePath.slice(dotIndex + 1).toLowerCase() : ''
70
return BINARY_EXTENSIONS.has(ext)
71
}
0 commit comments