This commit is contained in:
Barış Soner Uşaklı
2017-12-13 12:06:45 -05:00
parent 53afa552d0
commit b55087dab7
2 changed files with 31 additions and 14 deletions

View File

@@ -82,20 +82,23 @@ module.exports = function (Plugins) {
var hookList = Plugins.loadedHooks[hook];
var hookType = hook.split(':')[0];
switch (hookType) {
case 'filter':
fireFilterHook(hook, hookList, params, callback);
break;
case 'action':
fireActionHook(hook, hookList, params, callback);
break;
case 'static':
fireStaticHook(hook, hookList, params, callback);
break;
default:
winston.warn('[plugins] Unknown hookType: ' + hookType + ', hook : ' + hook);
break;
try {
switch (hookType) {
case 'filter':
fireFilterHook(hook, hookList, params, callback);
break;
case 'action':
fireActionHook(hook, hookList, params, callback);
break;
case 'static':
fireStaticHook(hook, hookList, params, callback);
break;
default:
winston.warn('[plugins] Unknown hookType: ' + hookType + ', hook : ' + hook);
break;
}
} catch (err) {
callback(err);
}
};