summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangqi02 <wangqi02@inspur.com>2022-10-25 05:04:17 +0300
committerJohn Wang <wangzhiqiang02@inspur.com>2022-11-10 12:58:49 +0300
commit946535f39b6e8f33505659e5eaf300632451d1db (patch)
tree21400c25c4b89b54334d95404759f50987a8e16f
parented7278a2f747586de9f938c1e234c514d9379cac (diff)
downloadwebui-vue-946535f39b6e8f33505659e5eaf300632451d1db.tar.xz
Fix In-page "Refresh" button doesn't update sensor readings
The reason for this problem is uniqBy always keep the first one when removing repetition Resolves: https://github.com/openbmc/webui-vue/issues/60 Change-Id: Iec87d7845e694b0f2a14de4061ae113eac492fc0 Signed-off-by: wangqi02 <wangqi02@inspur.com>
-rw-r--r--src/store/modules/HardwareStatus/SensorsStore.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/store/modules/HardwareStatus/SensorsStore.js b/src/store/modules/HardwareStatus/SensorsStore.js
index 287796d9..cae7795f 100644
--- a/src/store/modules/HardwareStatus/SensorsStore.js
+++ b/src/store/modules/HardwareStatus/SensorsStore.js
@@ -11,7 +11,7 @@ const SensorsStore = {
},
mutations: {
setSensors: (state, sensors) => {
- state.sensors = uniqBy([...state.sensors, ...sensors], 'name');
+ state.sensors = uniqBy([...sensors, ...state.sensors], 'name');
},
},
actions: {