diff --git a/src/node_api.cc b/src/node_api.cc index 5818cb25c1b6e8..59bac3a9c1179a 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -56,7 +56,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)