mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
use includes instead of indexOf
use _.uniq instead of filter&indexOf
This commit is contained in:
@@ -33,7 +33,7 @@ module.exports = function (Plugins) {
|
||||
|
||||
var method;
|
||||
|
||||
if (Object.keys(Plugins.deprecatedHooks).indexOf(data.hook) !== -1) {
|
||||
if (Object.keys(Plugins.deprecatedHooks).includes(data.hook)) {
|
||||
winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, ' +
|
||||
(Plugins.deprecatedHooks[data.hook] ?
|
||||
'please use `' + Plugins.deprecatedHooks[data.hook] + '` instead.' :
|
||||
|
||||
Reference in New Issue
Block a user