mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
chore(protocol/battlefield): replace if condition many ors with includes
This commit is contained in:
parent
a2835108d6
commit
7c774ac403
1 changed files with 1 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue