Cleaned up nullguard and comments
This commit is contained in:
parent
9d923a8b0e
commit
f3f72f34db
@ -141,11 +141,9 @@ export class HealthHelper {
|
||||
const effectDetails = bodyPartEffects[effect];
|
||||
|
||||
// Null guard
|
||||
if (!profileData.Health.BodyParts[bodyPartId].Effects) {
|
||||
profileData.Health.BodyParts[bodyPartId].Effects = {};
|
||||
}
|
||||
profileData.Health.BodyParts[bodyPartId].Effects ||= {};
|
||||
|
||||
// Already exists on server profile, skip
|
||||
// Effect already exists on limb in server profile, skip
|
||||
const profileBodyPartEffects = profileData.Health.BodyParts[bodyPartId].Effects;
|
||||
if (profileBodyPartEffects[effect]) {
|
||||
if (effect === "Exhaustion") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user