Add null protection to playerHasRecievedMaxNumberOfGift()
(cherry picked from commit 0c42a38306
)
This commit is contained in:
parent
019db50cf6
commit
0491be80f2
@ -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…
Reference in New Issue
Block a user