fix: valve raw.players being deleted (#463)

This commit is contained in:
Pedro Ivo Hudson 2024-01-14 18:18:04 -03:00 committed by GitHub
parent 68f9c01886
commit c81037040b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -268,7 +268,9 @@ export default class valve extends Core {
if (p.time === -1) return Number.MAX_VALUE if (p.time === -1) return Number.MAX_VALUE
return p.time return p.time
} }
const sortedPlayers = state.raw.players.sort((a, b) => {
const rawPlayers = [...state.raw.players]
const sortedPlayers = rawPlayers.sort((a, b) => {
return botProbability(a) - botProbability(b) return botProbability(a) - botProbability(b)
}) })