From e82edc833814cee86e8b86aa366afac9d72ce566 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 2 Jul 2019 15:02:44 +0200 Subject: [PATCH] Set metrics object through Vue.set --- platypush/backend/http/static/js/plugins/sensors/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/static/js/plugins/sensors/index.js b/platypush/backend/http/static/js/plugins/sensors/index.js index d5bfbf7c5..9f7afa266 100644 --- a/platypush/backend/http/static/js/plugins/sensors/index.js +++ b/platypush/backend/http/static/js/plugins/sensors/index.js @@ -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) {