no need for map

v1.18.x
Barış Soner Uşaklı 10 years ago
parent ee17367cc1
commit a14e22d534

@ -337,7 +337,7 @@ var async = require('async'),
if (err) { if (err) {
return callback(err); return callback(err);
} }
groupData = groupData.map(function(group) { groupData.forEach(function(group) {
if (group) { if (group) {
group.userTitle = validator.escape(group.userTitle) || validator.escape(group.name); group.userTitle = validator.escape(group.userTitle) || validator.escape(group.name);
group.userTitleEnabled = group.userTitleEnabled ? parseInt(group.userTitleEnabled, 10) === 1 : true; group.userTitleEnabled = group.userTitleEnabled ? parseInt(group.userTitleEnabled, 10) === 1 : true;
@ -351,7 +351,6 @@ var async = require('async'),
group['cover:position'] = '50% 50%'; group['cover:position'] = '50% 50%';
} }
} }
return group;
}); });
plugins.fireHook('filter:groups.get', {groups: groupData}, function(err, data) { plugins.fireHook('filter:groups.get', {groups: groupData}, function(err, data) {

Loading…
Cancel
Save