mirror of
https://github.com/morluto/rea.git
synced 2026-10-22 22:02:27 -05:00
fix(javascript): keep spread child argv counts unknown (#2748)
* fix(javascript): keep spread child argv counts unknown * test(javascript): own runtime controls and tighten evidence assertions * test(apple): keep dyld slice regression portable --------- Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
This commit is contained in:
1 parent
af142f656c
commit
b19f9e4d2d
2 files changed
+76
-1
No files matched your search
@@ -339,7 +339,10 @@ const spawnOptions = (candidate: SpawnCandidate): t.ObjectExpression | null => {
|
||||
const spawnArgvCount = (candidate: SpawnCandidate): number | null => {
|
||||
if (candidate.method === "exec") return null;
|
||||
const args = candidate.node.arguments[1];
|
||||
return t.isArrayExpression(args) ? args.elements.length : null;
|
||||
return t.isArrayExpression(args) &&
|
||||
!args.elements.some((element) => t.isSpreadElement(element))
|
||||
? args.elements.length
|
||||
: null;
|
||||
};
|
||||
|
||||
const objectHasProperty = (
|
||||
|
||||
Reference in new issue
Block a user