prevent crash if registerHook is called with invalid hook name
v1.18.x
barisusakli 9 years ago
parent a9a522c8ec
commit af75a887b5

@ -23,6 +23,10 @@ module.exports = function(Plugins) {
}
}
if (!data.hook) {
return winston.warn('[plugins/' + id + '] registerHook called with invalid data.hook', data);
}
var method;
if (Object.keys(Plugins.deprecatedHooks).indexOf(data.hook) !== -1) {

Loading…
Cancel
Save