Fix crash when there would be no widgets

v1.18.x
MrWaffle 11 years ago
parent 599027f2d3
commit 502886c3b9

@ -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));
})
};

Loading…
Cancel
Save