From 75b15b0942b258c3e0afcacd68c4acdee23dab59 Mon Sep 17 00:00:00 2001 From: liuyics15 <1179805842@qq.com> Date: Fri, 19 Jul 2024 11:15:19 +0800 Subject: [PATCH] keep consistency Signed-off-by: liuyics15 <1179805842@qq.com> --- interfaces/inner_api/cjffi/ark_interop/ark_interop_napi.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interfaces/inner_api/cjffi/ark_interop/ark_interop_napi.cpp b/interfaces/inner_api/cjffi/ark_interop/ark_interop_napi.cpp index dc908e8c..fcf99dc1 100644 --- a/interfaces/inner_api/cjffi/ark_interop/ark_interop_napi.cpp +++ b/interfaces/inner_api/cjffi/ark_interop/ark_interop_napi.cpp @@ -120,7 +120,9 @@ ARKTS_ValueType ARKTS_GetValueType(ARKTS_Env env, ARKTS_Value src) { ARKTS_ASSERT(src, "src is null", N_UNDEFINED); auto value = BIT_CAST(src, JSValueRef); - if (value.IsNull()) { + if (value.IsHole()) { + return N_UNDEFINED; + } else if (value.IsNull()) { return N_NULL; } else if (value.IsUndefined()) { return N_UNDEFINED; @@ -343,7 +345,6 @@ ARKTS_INLINE void FormatArguments(int32_t numArgs, ARKTS_Value args[], Local