Skip to content

Commit

Permalink
Update web-ifc-api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
beachtom committed Nov 17, 2024
1 parent b714890 commit aa1346d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts/web-ifc-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ declare var __WASM_PATH__:string;
let WebIFCWasm: any;

let currentScriptPath: string;
if (document !== undefined && document.currentScript !==undefined) {
const currentScriptData = (document?.currentScript as HTMLScriptElement);
if (typeof document !== 'undefined') {
const currentScriptData = (document.currentScript as HTMLScriptElement);
currentScriptPath = currentScriptData.src.substring(0, currentScriptData.src.lastIndexOf("/") + 1) ;
}

Expand Down

0 comments on commit aa1346d

Please sign in to comment.