From 4a39297e65efc3effc329dc6a64f21b0cbc9ec2c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 26 Jun 2018 15:41:43 +0100 Subject: [PATCH] PR feedback --- src/utils/WidgetUtils.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/WidgetUtils.js b/src/utils/WidgetUtils.js index 724fd490a4..69a840ce55 100644 --- a/src/utils/WidgetUtils.js +++ b/src/utils/WidgetUtils.js @@ -284,11 +284,10 @@ export default class WidgetUtils { throw new Error('User not logged in'); } const userWidgets = client.getAccountData('m.widgets'); - let userWidgetContent = {}; if (userWidgets && userWidgets.getContent()) { - userWidgetContent = userWidgets.getContent(); + return userWidgets.getContent(); } - return userWidgetContent; + return {}; } /**