diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js_native_api_v8.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 5d18980fc7..754d71f51d 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -2460,9 +2460,9 @@ napi_status napi_create_reference(napi_env env, CHECK_ARG(env, result); v8::Local<v8::Value> v8_value = v8impl::V8LocalValueFromJsValue(value); - - if (!(v8_value->IsObject() || v8_value->IsFunction())) { - return napi_set_last_error(env, napi_object_expected); + if (!(v8_value->IsObject() || v8_value->IsFunction() || + v8_value->IsSymbol())) { + return napi_set_last_error(env, napi_invalid_arg); } v8impl::Reference* reference = |