Skip to content

Commit 7735631

Browse files
committed
chore: simplify conditions
1 parent fb0ed02 commit 7735631

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shared/shared.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ const KNOWN_EXTENSIONS = new Set(
191191
)
192192

193193
export function treatAsHtml(filename: string): boolean {
194-
const ext = filename.split('.').pop()?.toLowerCase()
194+
const ext = filename.split('.').pop()
195195

196-
return ext == null || !KNOWN_EXTENSIONS.has(ext)
196+
return ext == null || !KNOWN_EXTENSIONS.has(ext.toLowerCase())
197197
}

0 commit comments

Comments
 (0)