fix extract and checkPad

This commit is contained in:
John McLear 2013-02-18 08:29:25 -08:00
parent 26699618ac
commit 4cfac2f624
2 changed files with 9 additions and 5 deletions

View file

@ -70,10 +70,12 @@ exports.flatten = function (lst) {
exports.callAll = function (hook_name, args) {
if (!args) args = {};
if (exports.plugins.hooks[hook_name] === undefined) return [];
return _.flatten(_.map(exports.plugins.hooks[hook_name], function (hook) {
return hookCallWrapper(hook, hook_name, args);
}), true);
if (exports.plugins){
if (exports.plugins.hooks[hook_name] === undefined) return [];
return _.flatten(_.map(exports.plugins.hooks[hook_name], function (hook) {
return hookCallWrapper(hook, hook_name, args);
}), true);
}
}
exports.aCallAll = function (hook_name, args, cb) {