Skip to content

Node.js based forum software built for the modern web

closes #2714

barisusakli1142f7700f2c
diff --git a/src/plugins.js b/src/plugins.js
index bd00bb8b0a..0c8a4ba394 100644
--- a/src/plugins.js
+++ b/src/plugins.js
@@ -343,16 +343,18 @@ var fs = require('fs'),
}).reduce(function(prev, cur) {
return prev.concat(cur);
});
- next(null, paths);
- }
- ], function(err, paths) {
- for (var x=0,numPaths=paths.length;x<numPaths;x++) {
- delete require.cache[paths[x]];
- }
- winston.verbose('[plugins] Plugin libraries removed from Node.js cache');
- next();
- });
+ Plugins.fireHook('filter:plugins.clearRequireCache', {paths: paths}, next);
+ },
+ function(data, next) {
+ for (var x=0,numPaths=data.paths.length;x<numPaths;x++) {
+ delete require.cache[data.paths[x]];
+ }
+ winston.verbose('[plugins] Plugin libraries removed from Node.js cache');
+
+ next();
+ },
+ ], next);
};
function addLanguages(params, callback) {