Skip to content

Commit

Permalink
Fix currentScriptData check
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhirn committed Nov 20, 2024
1 parent a25f6ee commit 59fa261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/web-ifc-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let WebIFCWasm: any;
let currentScriptPath: string;
if (typeof document !== 'undefined') {
const currentScriptData = (document.currentScript as HTMLScriptElement);
if (typeof currentScriptData.src !== 'undefined') currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ;
if (currentScriptData?.src !== undefined) currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ;
}

export * from "./ifc-schema";
Expand Down

0 comments on commit 59fa261

Please sign in to comment.