From 4d5e164fd2b702aa9e7378eb47e8deaaf14fda4c Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 21 Sep 2018 13:49:56 -0400 Subject: [PATCH] closes #6778 --- src/widgets/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/index.js b/src/widgets/index.js index d950429ce5..d2440d20db 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -51,7 +51,9 @@ widgets.render = function (uid, options, callback) { if (err) { return done(err); } - returnData[location] = renderedWidgets.filter(Boolean); + renderedWidgets = renderedWidgets.filter(Boolean); + returnData[location] = renderedWidgets.length ? renderedWidgets : undefined; + done(); }); }, function (err) {