diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index a26a73c5..97cc050b 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -340,7 +340,7 @@ export const getInventoryResponse = async ( }; const addString = (arr: string[], str: string): void => { - if (!arr.find(x => x == str)) { + if (arr.indexOf(str) == -1) { arr.push(str); } }; diff --git a/src/controllers/api/loginRewardsSelectionController.ts b/src/controllers/api/loginRewardsSelectionController.ts index 4b6fc210..290a13f8 100644 --- a/src/controllers/api/loginRewardsSelectionController.ts +++ b/src/controllers/api/loginRewardsSelectionController.ts @@ -26,7 +26,7 @@ export const loginRewardsSelectionController: RequestHandler = async (req, res) StoreItemType: body.ChosenReward }; inventoryChanges = (await handleStoreItemAcquisition(body.ChosenReward, inventory)).InventoryChanges; - if (!evergreenRewards.find(x => x == body.ChosenReward)) { + if (evergreenRewards.indexOf(body.ChosenReward) == -1) { inventory.LoginMilestoneRewards.push(body.ChosenReward); } } else { diff --git a/src/controllers/api/nemesisController.ts b/src/controllers/api/nemesisController.ts index 861e01ab..df8e1652 100644 --- a/src/controllers/api/nemesisController.ts +++ b/src/controllers/api/nemesisController.ts @@ -177,7 +177,7 @@ export const nemesisController: RequestHandler = async (req, res) => { weaponIdx = initialWeaponIdx; do { const weapon = weapons[weaponIdx]; - if (!body.target.DisallowedWeapons.find(x => x == weapon)) { + if (body.target.DisallowedWeapons.indexOf(weapon) == -1) { break; } weaponIdx = (weaponIdx + 1) % weapons.length; diff --git a/src/services/guildService.ts b/src/services/guildService.ts index f1bb5ff9..0d8999aa 100644 --- a/src/services/guildService.ts +++ b/src/services/guildService.ts @@ -445,7 +445,7 @@ export const addGuildMemberShipDecoContribution = (guildMember: IGuildMemberData export const processDojoBuildMaterialsGathered = (guild: TGuildDatabaseDocument, build: IDojoBuild): void => { if (build.guildXpValue) { guild.ClaimedXP ??= []; - if (!guild.ClaimedXP.find(x => x == build.resultType)) { + if (guild.ClaimedXP.indexOf(build.resultType) == -1) { guild.ClaimedXP.push(build.resultType); guild.XP += build.guildXpValue; } diff --git a/src/services/loginService.ts b/src/services/loginService.ts index 41e33ad3..f2ae70ec 100644 --- a/src/services/loginService.ts +++ b/src/services/loginService.ts @@ -90,7 +90,7 @@ export const getAccountIdForRequest = async (req: Request): Promise => { }; export const isAdministrator = (account: TAccountDocument): boolean => { - return !!config.administratorNames?.find(x => x == account.DisplayName); + return config.administratorNames?.indexOf(account.DisplayName) != -1; }; const platform_magics = [753, 639, 247, 37, 60]; diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 4a5150fe..e577a486 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -383,7 +383,7 @@ export const addMissionInventoryUpdates = async ( } if ( inventory.LibraryActiveDailyTaskInfo && - inventory.LibraryActiveDailyTaskInfo.EnemyTypes.find(x => x == scan.EnemyType) + inventory.LibraryActiveDailyTaskInfo.EnemyTypes.indexOf(scan.EnemyType) != -1 ) { inventory.LibraryActiveDailyTaskInfo.Scans ??= 0; inventory.LibraryActiveDailyTaskInfo.Scans += scan.Count;