From 9c44d047acc707ebf665bddbc1395886883b3c41 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 2 Jul 2019 15:08:32 +0200 Subject: [PATCH] Vue.set to set metrics object, array assignment won't be picked up by Vue listeners --- platypush/backend/http/static/js/plugins/sensors/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/http/static/js/plugins/sensors/index.js b/platypush/backend/http/static/js/plugins/sensors/index.js index 9f7afa266..6c56d567b 100644 --- a/platypush/backend/http/static/js/plugins/sensors/index.js +++ b/platypush/backend/http/static/js/plugins/sensors/index.js @@ -53,7 +53,7 @@ Vue.component('sensors', { onSensorEvent: function(event) { const data = event.data; for (const [name, value] of Object.entries(data)) { - this.metrics[name] = value; + Vue.set(this.metrics, name, value); } }, },