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

Signed-off-by: BrainL <libuyan1@huawei.com>
This commit is contained in:
BrainL 2024-09-09 05:08:07 +00:00 committed by Gitee
parent a9a85e375f
commit 83fd6cfd53
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -202,7 +202,6 @@ static ErrCode GetCustomShowingWindow(napi_env env, AsyncContext &asyncContext,
const napi_callback_info info, sptr<Rosen::Window> &window)
{
HILOG_INFO("[picker] GetCustomShowingWindow enter.");
napi_valuetype valueType;
napi_status status;
if (!IsTypeRight(env, asyncContext->argv[ARGS_TWO], napi_object)) {
HILOG_ERROR("[picker] The type of the parameter transferred to the window is not object.");
@ -210,7 +209,7 @@ static ErrCode GetCustomShowingWindow(napi_env env, AsyncContext &asyncContext,
}
auto windowObj = asyncContext->argv[ARGS_TWO];
napi_value getPropertiesFunc;
status = napi_get_name_property(env, windowObj, "getWindowProperties", &getPropertiesFunc);
status = napi_get_named_property(env, windowObj, "getWindowProperties", &getPropertiesFunc);
if (status != napi_ok || !getPropertiesFunc) {
HILOG_ERROR("[picker] getWindowProperties fail.");
return ERR_INV;