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:
parent
4d71b7501d
commit
867f998357
|
|
@ -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) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue