@smartico/public-api 0.0.384 → 0.0.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +10 -1
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Inbox/InboxMessage.ts +3 -0
- package/src/Tournaments/Tournament.ts +1 -1
- package/src/WSAPI/WSAPIJackpots.ts +3 -0
- package/src/WSAPI/WSAPIMiniGames.ts +3 -0
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ export interface Tournament {
|
|
|
76
76
|
|
|
77
77
|
export const TournamentItemsTransform = (items: Tournament[]): TTournament[] => {
|
|
78
78
|
return items
|
|
79
|
-
.filter((r) => r.tournamentId >= 1)
|
|
79
|
+
.filter((r) => r != null && r.tournamentId >= 1)
|
|
80
80
|
.map((r) => {
|
|
81
81
|
const x: TTournament = {
|
|
82
82
|
instance_id: r.tournamentInstanceId,
|
|
@@ -121,6 +121,9 @@ export class WSAPIJackpots extends WSAPIClans {
|
|
|
121
121
|
ECacheContext.WSAPI,
|
|
122
122
|
async () => {
|
|
123
123
|
const _jackpots = await this.api.jackpotGet(this.userExtId, filter);
|
|
124
|
+
if (!_jackpots?.items) {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
124
127
|
const _pots = _jackpots.items.map((jp) => jp.pot);
|
|
125
128
|
|
|
126
129
|
_jackpots.items.forEach((jp) => {
|
|
@@ -586,6 +586,9 @@ export class WSAPIMiniGames extends WSAPIRaffles {
|
|
|
586
586
|
CACHE_DATA_SEC,
|
|
587
587
|
);
|
|
588
588
|
const index = templates.findIndex((t) => t.id === data.saw_template_id);
|
|
589
|
+
if (index === -1) {
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
589
592
|
templates[index].spin_count = data.spin_count;
|
|
590
593
|
this.updateEntity(onUpdateContextKey.Saw, templates);
|
|
591
594
|
}
|