Fix python-worker.js path construction

Corrects the path concatenation for python-worker.js by adding a missing slash, ensuring the worker script loads correctly regardless of the base URL format.
This commit is contained in:
Feodor Fitsner 2025-09-26 09:07:53 -07:00
parent 4d71b7501d
commit 867f998357
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ globalThis.jsConnect = async function (appId, args, dartOnMessage) {
console.log(`Starting up Python worker: ${appId}, args: ${args}`); console.log(`Starting up Python worker: ${appId}, args: ${args}`);
_apps[appId] = app; _apps[appId] = app;
app.worker = new Worker((flet.entryPointBaseUrl.endsWith("/") ? app.worker = new Worker((flet.entryPointBaseUrl.endsWith("/") ?
flet.entryPointBaseUrl.slice(0, -1) : flet.entryPointBaseUrl) + "python-worker.js"); flet.entryPointBaseUrl.slice(0, -1) : flet.entryPointBaseUrl) + "/python-worker.js");
var error; var error;
app.worker.onmessage = (event) => { app.worker.onmessage = (event) => {