fix(replay): preserve sparse array positions in result projection (#522)

Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
Rudy Mizrahi Celekli
2026-10-05 14:50:05 +08:00
committed by GitHub
parent 405732a7f5
commit 9d1c3631b8
2 changed files with 56 additions and 0 deletions
+11
View File
@@ -434,6 +434,17 @@ const projectComplexValue = (
);
}
}
if (Array.isArray(candidate) && Array.isArray(output)) {
for (let index = 0; index < candidate.length; index += 1) {
if (Object.hasOwn(descriptors, String(index))) continue;
output[index] = projectValueRecursive(
null,
depth + 1,
ancestors,
context,
);
}
}
return output;
};