diff --git a/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp b/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp index aa2d6ad6a44a937531517ac9c16a20801724edcb..a6dd850ec4d61c5bbc9c2679adcd6458dd06f359 100644 --- a/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp +++ b/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp @@ -957,7 +957,7 @@ static napi_value GetTopWindowTask(void* contextPtr, napi_env env, napi_value ca if (lists->ability->GetWindow() == nullptr) { lists->errorCode = newApi ? static_cast(WmErrorCode::WM_ERROR_STATE_ABNORMALLY) : static_cast(WMError::WM_ERROR_NULLPTR); - lists->errMsg = "[window][getLatsWindow]msg: FA mode can not get ability window"; + lists->errMsg = "[window][getLastWindow]msg: FA mode can not get ability window"; return; } lists->window = Window::GetTopWindowWithId(lists->ability->GetWindow()->GetWindowId()); @@ -966,7 +966,7 @@ static napi_value GetTopWindowTask(void* contextPtr, napi_env env, napi_value ca if (contextPtr == nullptr || context == nullptr) { lists->errorCode = newApi ? static_cast(WmErrorCode::WM_ERROR_STATE_ABNORMALLY) : static_cast(WMError::WM_ERROR_NULLPTR); - lists->errMsg = "[window][getLatsWindow]msg: Stage mode without context"; + lists->errMsg = "[window][getLastWindow]msg: Stage mode without context"; return; } lists->window = Window::GetTopWindowWithContext(context->lock()); @@ -976,10 +976,10 @@ static napi_value GetTopWindowTask(void* contextPtr, napi_env env, napi_value ca if (lists == nullptr) { if (newApi) { task.Reject(env, JsErrUtils::CreateJsError(env, WmErrorCode::WM_ERROR_STATE_ABNORMALLY, - "[window][getLatsWindow]msg: NAPI abnormal")); + "[window][getLastWindow]msg: NAPI abnormal")); } else { task.Reject(env, JsErrUtils::CreateJsError(env, WMError::WM_ERROR_NULLPTR, - "[window][getLatsWindow]msg: NAPI abnormal")); + "[window][getLastWindow]msg: NAPI abnormal")); } return; } @@ -997,10 +997,10 @@ static napi_value GetTopWindowTask(void* contextPtr, napi_env env, napi_value ca if (lists->window == nullptr || lists->window->GetWindowState() == WindowState::STATE_DESTROYED) { if (newApi) { task.Reject(env, JsErrUtils::CreateJsError(env, WmErrorCode::WM_ERROR_STATE_ABNORMALLY, - "[window][getLatsWindow]msg: Get top window failed")); + "[window][getLastWindow]msg: Get top window failed")); } else { task.Reject(env, JsErrUtils::CreateJsError(env, WMError::WM_ERROR_NULLPTR, - "[window][getLatsWindow]msg: Get top window failed")); + "[window][getLastWindow]msg: Get top window failed")); } return; }