Skip to content

Commit fc511c9

Browse files
committed
Push into an array instead of creating a new on every --define
1 parent f043bb7 commit fc511c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cmake-rn/src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ const defineOption = new Option(
101101
);
102102
}
103103
const { name, type, value } = match.groups;
104-
return [...previous, { [type ? `${name}:${type}` : name]: value }];
104+
previous.push({ [type ? `${name}:${type}` : name]: value });
105+
return previous;
105106
})
106107
.default([]);
107108

0 commit comments

Comments
 (0)