mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
chore(protocol/gamespy3): replace if condition many ors with includes
This commit is contained in:
parent
7c774ac403
commit
c671d5ddf2
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ export default class gamespy3 extends Core {
|
|||
let value = playerInfo[from]
|
||||
|
||||
if (key === 'player') key = 'name'
|
||||
if (key === 'score' || key === 'ping' || key === 'team' || key === 'deaths' || key === 'pid') value = parseInt(value)
|
||||
if (['score', 'ping', 'team', 'deaths', 'pid'].includes(key)) value = parseInt(value)
|
||||
player[key] = value
|
||||
}
|
||||
state.players.push(player)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue