From 1e39d3a8d21407b1fe58a3b67588bd19c1b53501 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 2 Jul 2019 16:12:24 +0200 Subject: [PATCH] Return obj even when the metrics are undefined, or we will set this.metrics to undefined --- 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 07db0c2b..2cfbb263 100644 --- a/platypush/backend/http/static/js/plugins/sensors/index.js +++ b/platypush/backend/http/static/js/plugins/sensors/index.js @@ -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;