diff --git a/interop/src/cpp/napi/convertors-napi.cc b/interop/src/cpp/napi/convertors-napi.cc index 21a9eb41bfa28d7c6d7f6a02b4455a3c94fe45c7..725853dd5faac31a66701cd7d9b19e5c1b7b3f26 100644 --- a/interop/src/cpp/napi/convertors-napi.cc +++ b/interop/src/cpp/napi/convertors-napi.cc @@ -350,7 +350,7 @@ static napi_value InitModule(napi_env env, napi_value exports) { for (const auto &impl : inst->getMethods(module)) { napi_value implFunc; - status = napi_create_function(env, impl.first.c_str(), 0, impl.second, nullptr, &implFunc); + status = napi_create_function(env, impl.first.c_str(), NAPI_AUTO_LENGTH, impl.second, nullptr, &implFunc); KOALA_NAPI_THROW_IF_FAILED(env, status, exports); status = napi_set_named_property(env, target, impl.first.c_str(), implFunc); KOALA_NAPI_THROW_IF_FAILED(env, status, exports);