Fix _aser_component: evaluate kwargs with _aser not async_eval
_aser_component expands component bodies in SX wire format mode, but was evaluating kwarg values with async_eval (HTML mode). This caused SxExpr kwargs to be fully rendered to HTML strings, which then broke when serialized back to SX — producing bare symbols like 'div' that the client couldn't resolve. Fix: use _aser() for kwarg evaluation to keep values in SX format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -418,9 +418,6 @@
|
||||
if (name === "true") return true;
|
||||
if (name === "false") return false;
|
||||
if (name === "nil") return NIL;
|
||||
// Debug: log env keys to help diagnose
|
||||
var envKeys = Object.keys(env).filter(function(k) { return typeof env[k] !== "function"; }).slice(0, 20);
|
||||
console.error("Undefined symbol: " + name + " | env keys (non-fn): " + envKeys.join(", "));
|
||||
throw new Error("Undefined symbol: " + name);
|
||||
}
|
||||
|
||||
|
||||
@@ -1102,7 +1102,7 @@ async def _aser_component(
|
||||
while i < len(args):
|
||||
arg = args[i]
|
||||
if isinstance(arg, Keyword) and i + 1 < len(args):
|
||||
kwargs[arg.name] = await async_eval(args[i + 1], env, ctx)
|
||||
kwargs[arg.name] = await _aser(args[i + 1], env, ctx)
|
||||
i += 2
|
||||
else:
|
||||
children.append(arg)
|
||||
|
||||
Reference in New Issue
Block a user