From 7c774ac403f26e02f19215991c9f32bf0ee7be03 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 9 Jun 2025 23:24:31 +0300 Subject: [PATCH] chore(protocol/battlefield): replace if condition many ors with includes --- protocols/battlefield.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/protocols/battlefield.js b/protocols/battlefield.js index 389c700..697c2e3 100644 --- a/protocols/battlefield.js +++ b/protocols/battlefield.js @@ -85,16 +85,7 @@ export default class battlefield extends Core { if (key === 'teamId') key = 'team' else if (key === 'squadId') key = 'squad' - if ( - key === 'kills' || - key === 'deaths' || - key === 'score' || - key === 'rank' || - key === 'team' || - key === 'squad' || - key === 'ping' || - key === 'type' - ) { + if (['kills', 'deaths', 'score', 'rank', 'team', 'squad', 'ping', 'type'].includes(key)) { value = parseInt(value) }