Skip to content

Commit 763fd1d

Browse files
Merge pull request #118 from pyscript/fixed-unresolved-config
Fixed unresolved config in workers
2 parents 92c15b1 + 4d0e83e commit 763fd1d

File tree

5 files changed

+160
-281
lines changed

5 files changed

+160
-281
lines changed

docs/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/custom.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ export const handleCustomType = async (node) => {
6363
const worker = workerURL(node);
6464
if (worker) {
6565
let v = version;
66-
const cfg = node.getAttribute('config') || config || {};
67-
if (!v) {
68-
const [o] = resolveConfig(cfg, configURL);
69-
const details = await o;
70-
v = details.version || details.interpreter;
66+
let url = configURL;
67+
let cfg = node.getAttribute('config') || config || {};
68+
if (!v || !cfg) {
69+
const [o, u] = resolveConfig(cfg, configURL);
70+
cfg = await o;
71+
url = u;
72+
v = cfg.version || cfg.interpreter;
7173
}
7274
const xworker = XW.call(new Hook(null, hooks), worker, {
7375
...nodeInfo(node, type),
74-
configURL,
76+
configURL: url,
7577
version: v,
7678
type: runtime,
7779
custom: type,

0 commit comments

Comments
 (0)