Skip to content

Commit 46f7434

Browse files
committed
jsc: constructors are objects in JSC.
1 parent b08affe commit 46f7434

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test-app/runtime/src/main/cpp/runtime/jsonhelper/JSONObjectHelper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
using namespace tns;
99

1010
void JSONObjectHelper::RegisterFromFunction(napi_env env, napi_value value) {
11-
if (!napi_util::is_of_type(env, value, napi_function)) {
11+
napi_valuetype type;
12+
napi_typeof(env, value, &type);
13+
if (type != napi_function && type != napi_object) {
1214
return;
1315
}
1416

0 commit comments

Comments
 (0)