From 35f0c9940d0ea7c0cb37c711557454b77ac038ad Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 1 Mar 2022 19:59:47 -0500
Subject: updated to webpack 5

---
 src/client/util/Import & Export/DirectoryImportBox.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/client/util/Import & Export/DirectoryImportBox.tsx')

diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx
index 925b74efa..cf72cd0df 100644
--- a/src/client/util/Import & Export/DirectoryImportBox.tsx	
+++ b/src/client/util/Import & Export/DirectoryImportBox.tsx	
@@ -86,7 +86,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> {
         for (let i = 0; i < files.length; i++) {
             const file = files.item(i);
             if (file && !unsupported.includes(file.type)) {
-                const ext = path.extname(file.name).toLowerCase();
+                const ext = file.name.replace(/.*\./, "").toLowerCase(); // path.extname(file.name).toLowerCase();
                 if (AcceptableMedia.imageFormats.includes(ext)) {
                     validated.push(file);
                 }
@@ -120,7 +120,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> {
             }
             const { accessPaths, exifData } = result;
             const path = Utils.prepend(accessPaths.agnostic.client);
-            const document = await DocUtils.DocumentFromType(type, path, { _width: 300, title: name });
+            const document = type && await DocUtils.DocumentFromType(type, path, { _width: 300, title: name });
             const { data, error } = exifData;
             if (document) {
                 Doc.GetProto(document).exif = error || Doc.Get.FromJson({ data });
-- 
cgit v1.2.3-70-g09d2

