mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
use includes instead of indexOf
use _.uniq instead of filter&indexOf
This commit is contained in:
@@ -201,7 +201,7 @@ function upgradePlugins(callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (['y', 'Y', 'yes', 'YES'].indexOf(result.upgrade) !== -1) {
|
||||
if (['y', 'Y', 'yes', 'YES'].includes(result.upgrade)) {
|
||||
console.log('\nUpgrading packages...');
|
||||
var args = packageManagerInstallArgs.concat(found.map(function (suggestObj) {
|
||||
return suggestObj.name + '@' + suggestObj.suggested;
|
||||
|
||||
Reference in New Issue
Block a user