Return obj even when the metrics are undefined, or we will set this.metrics to undefined

This commit is contained in:
Fabio Manganiello 2019-07-02 16:12:24 +02:00
parent 75f7fbd67a
commit 1e39d3a8d2
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ Vue.component('sensors', {
Vue.set(this, 'metrics', (await Promise.all(promises)).reduce((obj, metrics) => {
if (!metrics)
return;
return obj;
for (const [name, value] of Object.entries(metrics)) {
obj[name] = value;