mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
global var
This commit is contained in:
@@ -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 + '\'');
|
||||
|
||||
Reference in New Issue
Block a user