Skip to content

Commit

Permalink
Fixed unresolved config in workers
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed Sep 24, 2024
1 parent 92c15b1 commit 06c3c69
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.js.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions esm/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ export const handleCustomType = async (node) => {
const worker = workerURL(node);
if (worker) {
let v = version;
const cfg = node.getAttribute('config') || config || {};
if (!v) {
const [o] = resolveConfig(cfg, configURL);
const details = await o;
v = details.version || details.interpreter;
let url = configURL;
let cfg = node.getAttribute('config') || config || {};
if (!v || !cfg) {
const [o, u] = resolveConfig(cfg, configURL);
cfg = await o;
url = u;
v = cfg.version || cfg.interpreter;
}
const xworker = XW.call(new Hook(null, hooks), worker, {
...nodeInfo(node, type),
configURL,
configURL: url,
version: v,
type: runtime,
custom: type,
Expand Down

0 comments on commit 06c3c69

Please sign in to comment.