Skip to content

Commit

Permalink
Merge pull request #1159 from peterhirn/main
Browse files Browse the repository at this point in the history
Fix currentScriptData check
  • Loading branch information
beachtom authored Nov 23, 2024
2 parents 63ec3fb + 59fa261 commit 40e529a
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 40e529a

Please sign in to comment.