From 7e9a71d5ad9a6a9a4dda24714a94c9bde708c99d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:32:25 -0400 Subject: [PATCH] Fix For Undefined --- src/plugins/anonymiseFileNames/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index 3be85888..4613fa60 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -122,7 +122,7 @@ export default definePlugin({ const fileName = extIdx !== -1 ? file.substring(0, extIdx) : ""; let ext = extIdx !== -1 ? file.slice(extIdx) : ""; if (Settings.plugins.FixFileExtensions.enabled) { - ext = reverseExtensionMap[ext]; + ext = reverseExtensionMap[ext] || ext; } if ((upload.anonymise ?? settings.store.anonymiseByDefault) === false) return fileName + ext;