Skip to content

Commit

Permalink
fix: document check for tsTransform for worker support (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Feb 17, 2025
1 parent c1b2870 commit 221eded
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export let fetchHook = esmsInitOptions.fetch ? globalHook(esmsInitOptions.fetch)
export const metaHook = esmsInitOptions.meta ? globalHook(shimMode && esmsInitOptions.meta) : noop;
export const tsTransform =
esmsInitOptions.tsTransform ||
(document.currentScript &&
(hasDocument &&
document.currentScript &&
document.currentScript.src.replace(self.ESMS_DEBUG ? /\.debug\.js$/ : /\.js$/, '-typescript.js')) ||
'./es-module-shims-typescript.js';

Expand Down

0 comments on commit 221eded

Please sign in to comment.