We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6498d7 commit 62e7cf0Copy full SHA for 62e7cf0
src/tls_wrap.cc
@@ -1141,12 +1141,11 @@ void TLSWrap::Initialize(Local<Object> target,
1141
env->SetProtoMethod(t, "getServername", GetServername);
1142
env->SetProtoMethod(t, "setServername", SetServername);
1143
1144
- env->set_tls_wrap_constructor_function(
1145
- t->GetFunction(env->context()).ToLocalChecked());
+ Local<Function> fn = t->GetFunction(env->context()).ToLocalChecked();
1146
1147
- target->Set(env->context(),
1148
- tlsWrapString,
1149
- t->GetFunction(env->context()).ToLocalChecked()).Check();
+ env->set_tls_wrap_constructor_function(fn);
+
+ target->Set(env->context(), tlsWrapString, fn).Check();
1150
}
1151
1152
} // namespace node
0 commit comments