Skip to content

Commit 402d66b

Browse files
committed
fix: Fix C++ AnyMap array tests
1 parent 3550a51 commit 402d66b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-native-nitro-image/cpp/HybridTestObjectCpp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ std::shared_ptr<AnyMap> HybridTestObjectCpp::createMap() {
115115
map->setBigInt("bigint", getBigintValue());
116116
map->setNull("null");
117117
std::vector<AnyValue> array{getNumberValue(), getBoolValue(), getStringValue(), getBigintValue()};
118-
map->setArray("array", {getNumberValue(), getBoolValue(), getStringValue(), getBigintValue(), array});
118+
map->setArray("array", array);
119+
std::vector<AnyValue> nestedArray{getNumberValue(), getBoolValue(), getStringValue(), getBigintValue(), array};
119120
map->setObject("object", {{"number", getNumberValue()},
120121
{"bool", getBoolValue()},
121122
{"string", getStringValue()},
122123
{"bigint", getBigintValue()},
123124
{"null", std::monostate()},
124-
{"array", array}});
125+
{"array", nestedArray}});
125126
return map;
126127
}
127128

0 commit comments

Comments
 (0)