From 6074d99e49229b208b5905678bf1ed92b85bf7e7 Mon Sep 17 00:00:00 2001 From: gwx1278443 Date: Fri, 2 Feb 2024 10:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gwx1278443 --- interfaces/kits/js/src/mod_fileio/properties/watcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp b/interfaces/kits/js/src/mod_fileio/properties/watcher.cpp index b7e2f536e..daa184491 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; -- Gitee