From 89af45ffa1d8e8634e9555ab61b67a0801220cfa Mon Sep 17 00:00:00 2001 From: Tom Beach Date: Tue, 19 Nov 2024 20:31:09 +0000 Subject: [PATCH] Fix error --- src/ts/web-ifc-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/web-ifc-api.ts b/src/ts/web-ifc-api.ts index 778b3aeb..cd9a4f6d 100644 --- a/src/ts/web-ifc-api.ts +++ b/src/ts/web-ifc-api.ts @@ -29,7 +29,7 @@ let WebIFCWasm: any; let currentScriptPath: string; if (typeof document !== 'undefined') { const currentScriptData = (document.currentScript as HTMLScriptElement); - currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ; + if (typeof currentScriptData.src !== 'undefined') currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ; } export * from "./ifc-schema";