From bed766c7f8dd187a67332b7aa0fd8ae32dc2b2eb Mon Sep 17 00:00:00 2001 From: hellohyh001 Date: Tue, 22 Mar 2022 16:22:24 +0800 Subject: [PATCH] modify sensor warning Signed-off-by: hellohyh001 --- interfaces/plugin/src/sensor_js.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/plugin/src/sensor_js.cpp b/interfaces/plugin/src/sensor_js.cpp index 1414b85e..591ee411 100644 --- a/interfaces/plugin/src/sensor_js.cpp +++ b/interfaces/plugin/src/sensor_js.cpp @@ -762,7 +762,7 @@ static napi_value GetSensorList(napi_env env, napi_callback_info info) napi_value args[1] = { 0 }; napi_value thisVar = nullptr; NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, &thisVar, NULL)); - if (argc < 0 || argc > 1) { + if (argc != 1) { HiLog::Error(LABEL, "%{public}s the number of input parameters does not match", __func__); return nullptr; } -- Gitee