Skip to content

Commit 1e98603

Browse files
committed
fix(console): add array-resolution distinct from that of object for console.dir
1 parent 27ce421 commit 1e98603

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test-app/runtime/src/main/cpp/console/Console.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ void Console::dirCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
304304

305305
if (propIsFunction) {
306306
ss << "()";
307+
} else if (propertyValue->IsArray()) {
308+
auto stringResult = buildStringFromArg(isolate, propertyValue);
309+
std::string jsonStringifiedArray = ArgConverter::ConvertToString(stringResult);
310+
ss << ": " << jsonStringifiedArray;
307311
} else if (propertyValue->IsObject()) {
308312
auto obj = propertyValue->ToObject(isolate);
309313
auto objString = transformJSObject(isolate, obj);

0 commit comments

Comments
 (0)