update interfaces/kits/picker/src/picker_n_exporter.cpp.

Signed-off-by: BrainL <libuyan1@huawei.com>
This commit is contained in:
BrainL 2024-10-08 12:23:14 +00:00 committed by Gitee
parent 1ed97a6a6d
commit 83a8e95b8e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -105,7 +105,7 @@ static void MakeResultWithBool(napi_env env, std::string key, napi_value &result
{
napi_status status = napi_generic_failure;
if (pickerCallBack->want.GetParams().HasParam(key.c_str())) {
const bool boolVal = pickerCallBack->want.GetIntParam(key.c_str(), false);
const bool boolVal = pickerCallBack->want.GetBoolParam(key.c_str(), false);
HILOG_INFO("[picker]: %{public}s is %{public}d ", key.c_str(), boolVal);
napi_value nBoolVal = nullptr;
napi_get_boolean(env, boolVal, &nBoolVal);