Skip to content

Commit

Permalink
fix: wrong parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
cylon3035 committed Dec 17, 2024
1 parent 11404d1 commit 0aedea9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/helpers/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ interface EngineWebEntryGlobalObj {
export function getEngineEntryOptions(envName: string, globalObj: EngineWebEntryGlobalObj): IRunOptions {
const urlParams = new URLSearchParams(globalObj?.location?.search);
const currentScript =
(globalObj?.document?.currentScript ?? (typeof import.meta !== 'undefined' && import.meta.url))
globalObj?.document?.currentScript ??
(typeof import.meta !== 'undefined' && import.meta.url
? // if env run as a module then in has no access to currentScript, in this case we find script by src
globalObj?.document?.querySelector?.<HTMLElement>(`script[src="${import.meta.url}"]`)
: undefined;
: undefined);

const optionsFromScript = new URLSearchParams(
(currentScript && currentScript.dataset.engineRunOptions) || undefined,
Expand Down

0 comments on commit 0aedea9

Please sign in to comment.