@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 CHANGED
@@ -911,6 +911,9 @@ var InboxMessagesTransform = function InboxMessagesTransform(items) {
911
911
  };
912
912
 
913
913
  var InboxMessageBodyTransform = function InboxMessageBodyTransform(item) {
914
+ if (!item) {
915
+ return null;
916
+ }
914
917
  var x = {
915
918
  action: item.action,
916
919
  icon: item.image,
@@ -1880,7 +1883,7 @@ TournamentUtils.getPrizeTransformed = function (prize) {
1880
1883
 
1881
1884
  var TournamentItemsTransform = function TournamentItemsTransform(items) {
1882
1885
  return items.filter(function (r) {
1883
- return r.tournamentId >= 1;
1886
+ return r != null && r.tournamentId >= 1;
1884
1887
  }).map(function (r) {
1885
1888
  var x = _extends({
1886
1889
  instance_id: r.tournamentInstanceId,
@@ -5968,6 +5971,9 @@ var WSAPIJackpots = /*#__PURE__*/function (_WSAPIClans) {
5968
5971
  return Promise.resolve(OCache.use(onUpdateContextKey.Jackpots, exports.ECacheContext.WSAPI, function () {
5969
5972
  try {
5970
5973
  return Promise.resolve(_this2.api.jackpotGet(_this2.userExtId, filter)).then(function (_jackpots) {
5974
+ if (!(_jackpots != null && _jackpots.items)) {
5975
+ return [];
5976
+ }
5971
5977
  var _pots = _jackpots.items.map(function (jp) {
5972
5978
  return jp.pot;
5973
5979
  });
@@ -7629,6 +7635,9 @@ var WSAPIMiniGames = /*#__PURE__*/function (_WSAPIRaffles) {
7629
7635
  var index = templates.findIndex(function (t) {
7630
7636
  return t.id === data.saw_template_id;
7631
7637
  });
7638
+ if (index === -1) {
7639
+ return;
7640
+ }
7632
7641
  templates[index].spin_count = data.spin_count;
7633
7642
  _this6.updateEntity(onUpdateContextKey.Saw, templates);
7634
7643
  });