Node.js based forum software built for the modern web
don't attempt to parse a non-existing widget area
psychobunnybdc7a19bd773
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.jsindex a613c84afe..1ebfb4ddbe 100644--- a/public/src/ajaxify.js+++ b/public/src/ajaxify.js@@ -166,16 +166,18 @@ var ajaxify = {};numLocations = widgetLocations.length;function renderWidget(err, renderedWidgets) {- area.html(templates.prepare(area.html()).parse({- widgets: renderedWidgets- })).removeClass('hidden');-- if (!renderedWidgets.length) {- $('body [no-widget-class]').each(function() {- var $this = $(this);- $this.removeClass();- $this.addClass($this.attr('no-widget-class'));- });+ if (area.html()) {+ area.html(templates.prepare(area.html()).parse({+ widgets: renderedWidgets+ })).removeClass('hidden');++ if (!renderedWidgets.length) {+ $('body [no-widget-class]').each(function() {+ var $this = $(this);+ $this.removeClass();+ $this.addClass($this.attr('no-widget-class'));+ });+ }}checkCallback();