From a9cc9bd530dac1e5865703b94f26987c2a5b26dd Mon Sep 17 00:00:00 2001 From: Kurtil Date: Mon, 6 Dec 2021 15:19:09 +0100 Subject: [PATCH] PATCH: fix no extension file in GED --- src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js b/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js index 1fd403f9..f11daf59 100644 --- a/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js +++ b/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js @@ -71,7 +71,8 @@ async function downloadFiles(files, apiInfos = {}) { } function getFileExtension(file) { - const extension = file.name.match(/\.([0-9a-z]+$)/)[1]; + const match = file.name.match(/\.([0-9a-z]+$)/); + const extension = match && match[1]; if (extension && extension.toLowerCase() === "ifczip") { return "ifc"; } else {