Skip to content

Commit

Permalink
possible fix to group category
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 2, 2015
1 parent c851b5a commit 8cb18b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,14 @@ var async = require('async'),
}

Groups.destroy = function(groupName, callback) {
Groups.get(groupName, {}, function(err, groupObj) {
Groups.getGroupsData([groupName], function(err, groupsData) {
if (err) {
return callback(err);
}
if (!Array.isArray(groupsData) || !groupsData[0]) {
return callback();
}
var groupObj = groupsData[0];
plugins.fireHook('action:group.destroy', groupObj);

async.parallel([
Expand Down

0 comments on commit 8cb18b1

Please sign in to comment.