@everymatrix/casino-games-category-section 0.0.361 → 0.0.363
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-games-category-section",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.363",
|
|
4
4
|
"main": "dist/casino-games-category-section.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": "c387eff5f038dffc7fde68f7e15e1ca719f4f209"
|
|
40
40
|
}
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
let hidden;
|
|
98
98
|
let visibilityChange;
|
|
99
99
|
let dataloaded;
|
|
100
|
+
let categoriesCache:Object = {};
|
|
100
101
|
|
|
101
102
|
let favoriteGamesData:any = {
|
|
102
103
|
items: [],
|
|
@@ -209,30 +210,28 @@
|
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
|
|
213
|
+
if ( categoryId && Object.keys(categoriesCache).indexOf(categoryId) >= 0) {
|
|
214
|
+
|
|
215
|
+
resolve(categoriesCache[categoryId]);
|
|
213
216
|
|
|
214
|
-
|
|
215
|
-
isLoading = false;
|
|
216
|
-
|
|
217
|
-
resolve(sessionData);
|
|
218
|
-
} else {
|
|
217
|
+
} else {
|
|
219
218
|
fetch(url)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
219
|
+
.then((res:any) => res.json())
|
|
220
|
+
.then((categoryData:any) => {
|
|
221
|
+
dataloaded = true
|
|
222
|
+
hasErrors = false;
|
|
223
|
+
maxTotal = categoryData.games.total;
|
|
224
|
+
|
|
225
|
+
categoriesCache[categoryId] = categoryData;
|
|
226
|
+
|
|
227
|
+
resolve(categoryData);
|
|
228
|
+
}, (err:any) => {
|
|
229
|
+
hasErrors = true;
|
|
230
|
+
|
|
231
|
+
console.error(err);
|
|
232
|
+
|
|
233
|
+
reject(err);
|
|
234
|
+
});
|
|
236
235
|
}
|
|
237
236
|
});
|
|
238
237
|
}
|