From b29cecb8cdc7383467e0dbd86a394c92f79ee38e Mon Sep 17 00:00:00 2001 From: ZhangYu Date: Fri, 6 Jan 2023 18:45:37 +0800 Subject: [PATCH] fixed 1ecf965 from https://gitee.com/ZhangYu-Home/arkui_ace_engine/pulls/8841 Fix the bug of Gauge. Signed-off-by: ZhangYu --- frameworks/bridge/declarative_frontend/jsview/js_gauge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/bridge/declarative_frontend/jsview/js_gauge.cpp b/frameworks/bridge/declarative_frontend/jsview/js_gauge.cpp index 17378dd5377..daaa9a1d547 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_gauge.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_gauge.cpp @@ -105,8 +105,8 @@ void JSGauge::SetEndAngle(const JSCallbackInfo& info) void JSGauge::SetColors(const JSCallbackInfo& info) { - if (info.Length() < 1) { - LOGE(" JSGauge::SetColors::The info is wrong, it is supposed to have atleast 1 arguments"); + if (info.Length() < 1 && !info[0]->IsNumber()) { + LOGE("JSGauge::SetEndAngle::The info is wrong, it is supposed to have atleast 1 arguments"); return; } std::vector colors; -- Gitee