10BC0
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a72622 commit a6af97fCopy full SHA for a6af97f
src/node_api.cc
@@ -2164,7 +2164,7 @@ napi_status napi_instanceof(napi_env env,
2164
2165
if (env->has_instance_available) {
2166
napi_value value, js_result, has_instance = nullptr;
2167
- napi_status status;
+ napi_status status = napi_generic_failure;
2168
napi_valuetype value_type;
2169
2170
// Get "Symbol" from the global object
@@ -2187,14 +2187,12 @@ napi_status napi_instanceof(napi_env env,
2187
if (value_type == napi_symbol) {
2188
env->has_instance.Reset(env->isolate,
2189
v8impl::V8LocalValueFromJsValue(value));
2190
- if (status != napi_ok) return status;
2191
has_instance = value;
2192
}
2193
2194
} else {
2195
has_instance = v8impl::JsValueFromV8LocalValue(
2196
v8::Local<v8::Value>::New(env->isolate, env->has_instance));
2197
2198
2199
2200
if (has_instance) {