backwards-compatibility for plugins if they return a callback

This commit is contained in:
Julian Lam
2014-03-10 17:32:50 -04:00
parent 19c9f1bb19
commit efb933f102

View File

@@ -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]);
}