Skip to content

Commit 128fe64

Browse files
committed
Fixed unresolved config in workers
1 parent 92c15b1 commit 128fe64

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/custom.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ 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 cfg = node.getAttribute('config') || config || {}, url = configURL;
67+
if (!v || !cfg) {
68+
const [o, u] = resolveConfig(cfg, configURL);
69+
cfg = await o;
70+
url = u;
71+
v = cfg.version || cfg.interpreter;
7172
}
7273
const xworker = XW.call(new Hook(null, hooks), worker, {
7374
...nodeInfo(node, type),
74-
configURL,
75+
configURL: url,
7576
version: v,
7677
type: runtime,
7778
custom: type,

0 commit comments

Comments
 (0)