From 088c5f01a219e63402cc442f29e1e2e1179dba4b Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 19 Dec 2022 13:31:40 -0800 Subject: [PATCH] fixup! src: add KeyObjectHandle::HasInstance --- src/crypto/crypto_keys.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc index edce17a76839d6..22b889ee3573dc 100644 --- a/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc @@ -894,8 +894,8 @@ size_t KeyObjectData::GetSymmetricKeySize() const { } bool KeyObjectHandle::HasInstance(Environment* env, Local value) { - auto t = env->crypto_key_object_handle_constructor(); - return t.IsEmpty() && t->HasInstance(value); + Local t = env->crypto_key_object_handle_constructor(); + return !t.IsEmpty() && t->HasInstance(value); } v8::Local KeyObjectHandle::Initialize(Environment* env) {