From 4045e92887ea55e7fdf0ce2a47e56efbdc8a6a6f Mon Sep 17 00:00:00 2001 From: Brett Anthoine Date: Wed, 18 Mar 2026 21:05:03 +0100 Subject: [PATCH] Fix: unwrap multi-return values in PropertyAccess and method calls (#1895) --- client/space_lua/eval.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/space_lua/eval.ts b/client/space_lua/eval.ts index 563b730a..230a5524 100644 --- a/client/space_lua/eval.ts +++ b/client/space_lua/eval.ts @@ -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": {