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 MylesBorins committed Dec 12, 2017
1 parent 5fc1e27 commit 9e50f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Expand Up @@ -1602,7 +1602,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 9e50f17

Please sign in to comment.