Skip to content

Commit 3cf6a7b

Browse files
committed
Use undefined
1 parent d818720 commit 3cf6a7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/crypto/crypto_dh.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ using v8::ReadOnly;
2828
using v8::SideEffectType;
2929
using v8::Signature;
3030
using v8::String;
31+
using v8::Undefined;
3132
using v8::Value;
3233

3334
namespace crypto {
@@ -575,7 +576,7 @@ Local<Value> StatelessDiffieHellman(
575576
their_key,
576577
&buf,
577578
&out_size))
578-
return Local<Value>();
579+
return Undefined(env->isolate());
579580

580581
return Buffer::New(env,
581582
buf,
@@ -621,7 +622,7 @@ void DiffieHellman::Stateless(const FunctionCallbackInfo<Value>& args) {
621622
ManagedEVPPKey their_key = their_key_object->Data()->GetAsymmetricKey();
622623

623624
Local<Value> out = StatelessDiffieHellman(env, our_key, their_key);
624-
if (out.IsEmpty() || Buffer::Length(out) == 0)
625+
if (out->IsUndefined() || Buffer::Length(out) == 0)
625626
return ThrowCryptoError(env, ERR_get_error(), "diffieHellman failed");
626627

627628
args.GetReturnValue().Set(out);

0 commit comments

Comments
 (0)