@everymatrix/casino-last-played-section 1.13.6 → 1.13.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-last-played-section",
3
- "version": "1.13.6",
3
+ "version": "1.13.7",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "71837cbb0b2825cc3c42af1fc6188c5b2a835369"
38
+ "gitHead": "b21ba9bbcd96f48838ae02c6feb60ee099962317"
39
39
  }
@@ -117,12 +117,16 @@
117
117
  }
118
118
  });
119
119
 
120
- Promise.all(promises).then((values:any) => {
121
- lastPlayedGames = values.map((item:any) => item[0]);
120
+ Promise.all(promises).then((values) => {
121
+ lastPlayedGames = values.filter((item) => !('error' in item)).map((item) => item[0]);
122
+
123
+ if (casinomygames === "true") {
124
+ lastPlayedGames = lastPlayedGames.slice(0, JSON.parse(visiblegames));
125
+ }
122
126
 
123
127
  window.postMessage({ type: 'LastPlayedData', lastPlayedGames }, window.location.href);
124
128
  });
125
-
129
+
126
130
  } else {
127
131
  lastPlayedEmpty = true;
128
132
  }