From 7735631597450e96fe9dff718f808bf1f817592e Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Mon, 1 Jan 2024 22:22:37 +0530 Subject: [PATCH] chore: simplify conditions --- src/shared/shared.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/shared.ts b/src/shared/shared.ts index 1c3ba524..44f562a9 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -191,7 +191,7 @@ const KNOWN_EXTENSIONS = new Set( ) export function treatAsHtml(filename: string): boolean { - const ext = filename.split('.').pop()?.toLowerCase() + const ext = filename.split('.').pop() - return ext == null || !KNOWN_EXTENSIONS.has(ext) + return ext == null || !KNOWN_EXTENSIONS.has(ext.toLowerCase()) }