@opendata-ai/openchart-vanilla 6.1.3 → 6.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2348,9 +2348,8 @@ var SimulationManager = class _SimulationManager {
2348
2348
  w.terminate();
2349
2349
  this.worker = null;
2350
2350
  try {
2351
- const w2 = new Worker(new URL("./simulation-worker.ts", import.meta.url), {
2352
- type: "module"
2353
- });
2351
+ const tsUrl = new URL(import.meta.url.replace(/\/[^/]+$/, "/simulation-worker.ts"));
2352
+ const w2 = new Worker(tsUrl, { type: "module" });
2354
2353
  w2.onerror = () => {
2355
2354
  if (this.destroyed) return;
2356
2355
  console.warn("[SimulationManager] Worker failed to load, falling back to sync");