mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
Make null check more specific, not just falsy
This commit is contained in:
parent
3a5b909419
commit
10650528f5
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ function handleEntity(entity: PacketEntity, match: Match) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prop.definition.ownerTableName === 'm_iAmmo') {
|
if (prop.definition.ownerTableName === 'm_iAmmo') {
|
||||||
if (prop.value && prop.value > 0) {
|
if (prop.value !== null && prop.value > 0) {
|
||||||
player.ammo[parseInt(prop.definition.name, 10)] = <number>prop.value;
|
player.ammo[parseInt(prop.definition.name, 10)] = <number>prop.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue