Set metrics object through Vue.set
This commit is contained in:
parent
be79d15faf
commit
e82edc8338
1 changed files with 2 additions and 2 deletions
|
@ -41,13 +41,13 @@ Vue.component('sensors', {
|
|||
});
|
||||
});
|
||||
|
||||
this.metrics = (await Promise.all(promises)).reduce((obj, metrics) => {
|
||||
Vue.set(this, 'metrics', (await Promise.all(promises)).reduce((obj, metrics) => {
|
||||
for (const [name, value] of Object.entries(metrics)) {
|
||||
obj[name] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}, {});
|
||||
}, {}));
|
||||
},
|
||||
|
||||
onSensorEvent: function(event) {
|
||||
|
|
Loading…
Reference in a new issue