@everymatrix/casino-search 1.5.3 → 1.5.4
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/casino-search.js +46 -38
- package/dist/casino-search.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoSearch.svelte +8 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-search",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "0515078fefc5290a183afcfb2608cf265f2322c7"
|
|
40
40
|
}
|
package/src/CasinoSearch.svelte
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
let promises:Array<Promise<any>> = [];
|
|
88
88
|
let index = 0;
|
|
89
89
|
let length = recentSearchedGamesArray.length;
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
if (length > 0) {
|
|
92
92
|
for (index = 0; index < length; index++) {
|
|
93
93
|
let url:any = new URL(`${endpoint}/casino/games/${recentSearchedGamesArray[index]}`);
|
|
@@ -100,6 +100,9 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
Promise.all(promises).then((res:any):void => {
|
|
103
|
+
res = res.filter(function( element ) {
|
|
104
|
+
return !!element;
|
|
105
|
+
});
|
|
103
106
|
searchArray = res.map((item) => {
|
|
104
107
|
item.isFavorite = checkFavorite(item.id);
|
|
105
108
|
|
|
@@ -153,7 +156,9 @@
|
|
|
153
156
|
.then(gameData => {
|
|
154
157
|
isLoading = false;
|
|
155
158
|
|
|
156
|
-
|
|
159
|
+
if(!gameData.error){
|
|
160
|
+
gamesCache[gameData[0].gameId] = gameData[0];
|
|
161
|
+
}
|
|
157
162
|
|
|
158
163
|
resolve(gameData[0]);
|
|
159
164
|
}).catch((err:any) => {
|
|
@@ -302,7 +307,7 @@
|
|
|
302
307
|
|
|
303
308
|
getGames(searchUrl).then((searchData:any) => {
|
|
304
309
|
searchArray = searchData.items.map((item) => {
|
|
305
|
-
|
|
310
|
+
item.isFavorite = checkFavorite(item.id);
|
|
306
311
|
|
|
307
312
|
return item;
|
|
308
313
|
});
|