mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 21:50:43 -05:00
Add null protection to playerHasRecievedMaxNumberOfGift()
This commit is contained in:
parent
0cb179f8e1
commit
0c42a38306
@ -359,11 +359,11 @@ export class ProfileHelper {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!profile.spt.receivedGifts) {
|
||||
if (!profile.spt?.receivedGifts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const giftDataFromProfile = profile.spt.receivedGifts.find((x) => x.giftId === giftId);
|
||||
const giftDataFromProfile = profile.spt?.receivedGifts?.find((gift) => gift.giftId === giftId);
|
||||
if (!giftDataFromProfile) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user