diff --git a/interfaces/plugin/src/sensor_js.cpp b/interfaces/plugin/src/sensor_js.cpp index 1414b85ed001adc6a109c9e3d3cac97b866ca000..591ee411d9eca7a5785a181c0cb00fbcf8724621 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; }