diff --git a/public/src/widgets.js b/public/src/widgets.js
index 082b291624..badc55c892 100644
--- a/public/src/widgets.js
+++ b/public/src/widgets.js
@@ -23,22 +23,22 @@
widgetsAtLocation.forEach(function (widget) {
html += widget.html;
-
- if (location === 'footer' && !$('#content [widget-area="footer"]').length) {
- $('#content').append($('
'));
- } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) {
- if ($('[component="account/cover"]').length) {
- $('[component="account/cover"]').nextAll().wrapAll($(''));
- } else if ($('[component="groups/cover"]').length) {
- $('[component="groups/cover"]').nextAll().wrapAll($(''));
- } else {
- $('#content > *').wrapAll($(''));
- }
- } else if (location === 'header' && !$('#content [widget-area="header"]').length) {
- $('#content').prepend($(''));
- }
});
+ if (location === 'footer' && !$('#content [widget-area="footer"]').length) {
+ $('#content').append($(''));
+ } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) {
+ if ($('[component="account/cover"]').length) {
+ $('[component="account/cover"]').nextAll().wrapAll($(''));
+ } else if ($('[component="groups/cover"]').length) {
+ $('[component="groups/cover"]').nextAll().wrapAll($(''));
+ } else {
+ $('#content > *').wrapAll($(''));
+ }
+ } else if (location === 'header' && !$('#content [widget-area="header"]').length) {
+ $('#content').prepend($(''));
+ }
+
area = $('#content [widget-area="' + location + '"]');
if (html && area.length) {
area.html(html);