Skip to content

Commit

Permalink
crypto: use SetNull instead of Set
Browse files Browse the repository at this point in the history
This commit updates the only usage of Set(Null(env->isolate()) to use
SetNull() instead which is used in other places in node_crypto.cc.

PR-URL: #17521
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
danbev authored and gibfahn committed Dec 20, 2017
1 parent 3cf8f98 commit b563908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ void SecureContext::GetCertificate(const FunctionCallbackInfo<Value>& args) {
else
cert = wrap->issuer_;
if (cert == nullptr)
return args.GetReturnValue().Set(Null(env->isolate()));
return args.GetReturnValue().SetNull();

int size = i2d_X509(cert, nullptr);
Local<Object> buff = Buffer::New(env, size).ToLocalChecked();
Expand Down

0 comments on commit b563908

Please sign in to comment.