From 6d1a26a3151627816e2fc67db3adb5d177b5f8ca Mon Sep 17 00:00:00 2001 From: leo-jiqimao Date: Sun, 15 Mar 2026 08:33:34 +0800 Subject: [PATCH] fix: preserve zero values in formatTable Fix formatTable to use null/undefined check instead of falsy check, so numeric 0 values are correctly displayed instead of '-'. --- skills/aliyun-ecs-skill/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skills/aliyun-ecs-skill/src/index.js b/skills/aliyun-ecs-skill/src/index.js index c68d7aebe45..05aec91f968 100755 --- a/skills/aliyun-ecs-skill/src/index.js +++ b/skills/aliyun-ecs-skill/src/index.js @@ -34,7 +34,8 @@ function formatTable(data, columns) { data.forEach(row => { output += '|'; columns.forEach(col => { - const value = String(row[col.key] || '-'); + const cellValue = row[col.key]; + const value = String(cellValue !== undefined && cellValue !== null ? cellValue : '-'); output += ` ${value.padEnd(widths[col.key] - 1)}|`; }); output += '\n';