Skip to content

Node.js based forum software built for the modern web

backwards-compatibility for plugins if they return a callback

Julian Lamefb933f10206
diff --git a/src/plugins.js b/src/plugins.js
index b10e762ca5..8e5a773fbc 100644
--- a/src/plugins.js
+++ b/src/plugins.js
@@ -320,7 +320,7 @@ var fs = require('fs'),
next(arguments[0], Array.prototype.slice.call(arguments, 1));
}));
- if (value !== undefined) {
+ if (value !== undefined && value !== callback) {
winston.warn('[plugins/' + hookObj.id + '] "callbacked" deprecated as of 0.4x. Use asynchronous method instead for hook: ' + hook);
next(null, [value]);
}