diff --git a/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp b/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp index b7e2f536ef965c44665cc62fd3593df62551c573..daa18449107ac10409b29cee11e00a7951d46e58 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp +++ b/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp @@ -44,7 +44,8 @@ void Watcher::RunCommand(uv_fs_event_t *handle, const char *filename, int events napi_value callback = nullptr; napi_get_reference_value(information->env, information->ref, &callback); vector argv; - argv.push_back(NVal::CreateInt64(information->env, events).val_); + argv = { UniError(ERRNO_NOERR).GetNapiErr(information->env), + NVal::CreateInt64(information->env, events).val_ }; napi_value global = nullptr; napi_get_global(information->env, &global); napi_value tmp = nullptr;