mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 06: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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!profile.spt.receivedGifts) {
|
if (!profile.spt?.receivedGifts) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const giftDataFromProfile = profile.spt.receivedGifts.find((x) => x.giftId === giftId);
|
const giftDataFromProfile = profile.spt?.receivedGifts?.find((gift) => gift.giftId === giftId);
|
||||||
if (!giftDataFromProfile) {
|
if (!giftDataFromProfile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user