Fix: unwrap multi-return values in PropertyAccess and method calls (#1895)

This commit is contained in:
Brett Anthoine
2026-03-18 21:05:03 +01:00
committed by GitHub
parent 6aad7cff43
commit 4045e92887
+4 -2
View File
@@ -972,9 +972,11 @@ function evalPrefixExpression(
// Sync-first: evaluate object; avoid Promise when object is sync.
const objV = evalPrefixExpression(pa.object, env, sf);
if (!isPromise(objV)) {
return luaGet(objV, pa.property, pa.ctx, sf);
return luaGet(singleResult(objV), pa.property, pa.ctx, sf);
}
return rpThen(objV, (obj) => luaGet(obj, pa.property, pa.ctx, sf));
return rpThen(objV, (obj) =>
luaGet(singleResult(obj), pa.property, pa.ctx, sf),
);
}
case "FunctionCall": {