From 9e203194e021967605f750bbfae22adb986dcaaa Mon Sep 17 00:00:00 2001 From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:34:11 +0530 Subject: [PATCH] Update formats --- renderer/pages/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer/pages/index.tsx b/renderer/pages/index.tsx index b5b6b5b..3eb9b06 100644 --- a/renderer/pages/index.tsx +++ b/renderer/pages/index.tsx @@ -89,9 +89,9 @@ const Home = () => { const validateImagePath = (path: string) => { if (path.length > 0) { logit("🖼 imagePath: ", path); - const extension = path.toLowerCase().split(".").pop(); + const extension = path.split(".").pop().toLowerCase(); logit("🔤 Extension: ", extension); - if (!VALID_IMAGE_FORMATS.includes(extension.toLowerCase())) { + if (!VALID_IMAGE_FORMATS.includes(extension)) { toast({ title: t("ERRORS.INVALID_IMAGE_ERROR.TITLE"), description: t("ERRORS.INVALID_IMAGE_ERROR.DESCRIPTION"),