From 61bc846e0b877457bdae6a09154ef982dc89dd98 Mon Sep 17 00:00:00 2001 From: wanxiaoqing Date: Thu, 12 Dec 2024 11:45:30 +0800 Subject: [PATCH] =?UTF-8?q?key=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=8A=9B?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E5=BC=82=E5=B8=B8code=E5=92=8Cmessage?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanxiaoqing --- framework/jskitsimpl/data/unified_data_channel_napi.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/framework/jskitsimpl/data/unified_data_channel_napi.cpp b/framework/jskitsimpl/data/unified_data_channel_napi.cpp index d1c4bab..ebfb1eb 100644 --- a/framework/jskitsimpl/data/unified_data_channel_napi.cpp +++ b/framework/jskitsimpl/data/unified_data_channel_napi.cpp @@ -136,8 +136,7 @@ napi_value UnifiedDataChannelNapi::UpdateData(napi_env env, napi_callback_info i ctxt->unifiedData = unifiedDataNapi->value_; auto execute = [ctxt]() { QueryOption option = { .key = ctxt->key }; - auto status = UdmfClient::GetInstance().UpdateData(option, *(ctxt->unifiedData)); - ASSERT_WITH_ERRCODE(ctxt, status == E_OK, status, "UpdateData failed!"); + UdmfClient::GetInstance().UpdateData(option, *(ctxt->unifiedData)); }; return NapiQueue::AsyncWork(env, ctxt, std::string(__FUNCTION__), execute); } @@ -180,7 +179,6 @@ napi_value UnifiedDataChannelNapi::QueryData(napi_env env, napi_callback_info in ASSERT_WITH_ERRCODE(ctxt, status == E_OK, status, "QueryData failed!"); }; auto output = [env, ctxt](napi_value &result) { - ASSERT_WITH_ERRCODE(ctxt, !ctxt->unifiedDataSet.empty(), E_ERROR, "unifiedDataSet is empty!"); ctxt->status = ConvertUnifiedDataSetToNapi(env, ctxt->unifiedDataSet, result); ASSERT_WITH_ERRCODE(ctxt, ctxt->status == napi_ok, E_ERROR, "ConvertUnifiedDataSetToNapi failed!"); }; -- Gitee