diff --git a/src/node_api.cc b/src/node_api.cc index 986a9facccac9d..06f18562e7d3c0 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -58,7 +58,8 @@ struct napi_env__ { (destination)->SetInternalFieldCount((field_count)); \ (env)->prefix ## _template.Reset(isolate, (destination)); \ } else { \ - (destination) = env->prefix ## _template.Get(isolate); \ + (destination) = v8::Local::New( \ + isolate, env->prefix ## _template); \ } \ } while (0)