From 192359b9a22a391efeccf2d5bc5c8de8d71613c5 Mon Sep 17 00:00:00 2001 From: hemenghao Date: Tue, 15 Apr 2025 14:17:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=9F=BA=E5=88=86=E6=94=AF=E6=8C=91?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hemenghao --- .../napi/inputmethodability/js_text_input_client_engine.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp b/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp index be80d33d3..540a45d65 100644 --- a/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp +++ b/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp @@ -708,9 +708,8 @@ napi_value JsTextInputClientEngine::SendExtendAction(napi_env env, napi_callback auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { PARAM_CHECK_RETURN(env, argc > 0, "at least one parameter is required!", TYPE_NONE, napi_generic_failure); auto status = JsUtils::GetValue(env, argv[0], ctxt->action); - if (status != napi_ok) { - ctxt->SetErrorMessage("action must be number and should in ExtendAction"); - } + PARAM_CHECK_RETURN(env, status == napi_ok, "action must be number and should in ExtendAction", + TYPE_NONE, napi_generic_failure); return status; }; auto exec = [ctxt](AsyncCall::Context *ctx) { -- Gitee