global var

v1.18.x
Aziz Khoury 11 years ago
parent 086013829b
commit 61a5d4768a

@ -295,14 +295,14 @@ var fs = require('fs'),
};
Plugins.fireHook = function(hook) {
var callback = typeof arguments[arguments.length-1] === "function" ? arguments[arguments.length-1] : null,
var callback = typeof arguments[arguments.length-1] === 'function' ? arguments[arguments.length-1] : null,
args = arguments.length ? Array.prototype.slice.call(arguments, 1) : [];
if (callback) {
args.pop();
}
hookList = Plugins.loadedHooks[hook];
var hookList = Plugins.loadedHooks[hook];
if (hookList && Array.isArray(hookList)) {
// if (global.env === 'development') winston.info('[plugins] Firing hook: \'' + hook + '\'');

Loading…
Cancel
Save