Node.js based forum software built for the modern web
Fix crash when there would be no widgets
MrWaffle502886c3b9b0
diff --git a/src/widgets.js b/src/widgets.jsindex 9f865b02fa..7c8f221444 100644--- a/src/widgets.js+++ b/src/widgets.js@@ -37,6 +37,9 @@ var async = require('async'),Widgets.getArea = function(template, location, callback) {db.getObjectField('widgets:' + template, location, function(err, widgets) {+ if (!widgets) {+ return callback(err, []);+ }callback(err, JSON.parse(widgets));})};