@everymatrix/casino-slider 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-slider",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "main": "dist/casino-slider.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": "455c9a0d14fef23d3698fbea37042c69e3aeed24"
39
+ "gitHead": "0515078fefc5290a183afcfb2608cf265f2322c7"
40
40
  }
@@ -87,9 +87,6 @@
87
87
  left: -250,
88
88
  behavior: 'smooth'
89
89
  });
90
- if(showsubgroups == 'true') {
91
- obtainSubcategories();
92
- }
93
90
  }
94
91
 
95
92
  let scrollRight = ():void => {
@@ -97,9 +94,6 @@
97
94
  left: +250,
98
95
  behavior: 'smooth'
99
96
  });
100
- if(showsubgroups == 'true') {
101
- obtainSubcategories();
102
- }
103
97
  }
104
98
 
105
99
  const setActiveIndex = ():void => {
@@ -107,9 +101,6 @@
107
101
  if (!prevIndex) {
108
102
  prevIndex = activeIndex;
109
103
  }
110
- if(showsubgroups == 'true') {
111
- obtainSubcategories();
112
- }
113
104
  }
114
105
 
115
106
  const messageHandler = (e:any):void => {
@@ -156,7 +147,11 @@
156
147
  //Send list of subgroups ids
157
148
  const subGroupsIds: any[] = [];
158
149
  subGroupsData.map(subGroup => {
159
- subGroup.items.forEach(item => subGroupsIds.push(item.id));
150
+ subGroup.items.forEach(item => {
151
+ if(!subGroupsIds.find(id => item.id == id)){
152
+ subGroupsIds.push(item.id);
153
+ }
154
+ });
160
155
  return subGroupsIds.flat();
161
156
  });
162
157
  window.postMessage({type: 'SubgroupsIds', subGroupsIds: subGroupsIds});