Skip to content

Commit 1c1de1d

Browse files
authored
Merge pull request #1155 from ThatOpen/Fix2
Fix error
2 parents 908fb78 + 89af45f commit 1c1de1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ts/web-ifc-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let WebIFCWasm: any;
2929
let currentScriptPath: string;
3030
if (typeof document !== 'undefined') {
3131
const currentScriptData = (document.currentScript as HTMLScriptElement);
32-
currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ;
32+
if (typeof currentScriptData.src !== 'undefined') currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ;
3333
}
3434

3535
export * from "./ifc-schema";

0 commit comments

Comments
 (0)