From 23c2f32eb7f5516a74a4e49bb3562f9cf51b7555 Mon Sep 17 00:00:00 2001 From: zhaobing Date: Thu, 25 Jan 2024 09:32:35 +0800 Subject: [PATCH] feat:fix bugs --- api/app/lib/controllers/monitor/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/monitor/index.js b/api/app/lib/controllers/monitor/index.js index 05e1285..a1d53c4 100644 --- a/api/app/lib/controllers/monitor/index.js +++ b/api/app/lib/controllers/monitor/index.js @@ -187,7 +187,7 @@ async function getMonitorData(ctx) { factorNames = item.Items.split(',') c = item.ItemUnits.split(',') factorNames.map((child, index) => { - items[factorNames[index]] = { name: factors[index], unit: c[index] } + items[factorNames[index]?factorNames[index]:factors[index]] = { name: factors[index], unit: c[index] } }) }) }