@everymatrix/casino-page 1.3.0 → 1.3.1

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-page",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "dist/casino-page.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": "ac0e71f6ea97bb7428ee75f5667c1408cbdc3146"
39
+ "gitHead": "9eec5ce2cbfe4f1f8933cd93a292c2fee16bf1aa"
40
40
  }
@@ -829,7 +829,6 @@
829
829
 
830
830
  //Create a list of all categories to check the activecategory against.
831
831
  allCategoriesIds = data.items.map(category => category.id.toString());
832
-
833
832
  isLoading = false;
834
833
  }
835
834
  });
@@ -857,9 +856,11 @@
857
856
  const setActiveCategory = ():void => {
858
857
  activeCategory = activecategory;
859
858
  CategoryChangeHandler({ data: { itemId: activeCategory }});
859
+ }
860
860
 
861
+ const checkExistentCategory = ():void => {
861
862
  //Check if the active category is found in the list of available categories. IF not send event to the state manager.
862
- if (allCategoriesIds && !allCategoriesIds.includes(activeCategory) && activeCategory != '') {
863
+ if (allCategoriesIds && !allCategoriesIds.includes(decodeURI(activeCategory)) && activeCategory != '') {
863
864
  window.postMessage({type: 'NonExistentCategory'}, window.location.href);
864
865
  }
865
866
  }
@@ -945,6 +946,7 @@
945
946
 
946
947
  $: lang && activecategory && setActiveCategory();
947
948
  $: session && userid && endpoint && setSession();
949
+ $: activeCategory && allCategoriesIds && checkExistentCategory();
948
950
  $: endpoint && datasource && lang && alternativesearch && initialSetup();
949
951
  $: lang && updateCategoriesLanguage();
950
952
  $: translationurl && setTranslationUrl();