wt-front-shared 1.0.69 → 1.0.70

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.
@@ -6165,8 +6165,25 @@ const getStaticData = (contentType, subSection, where) => createSelector(getStat
6165
6165
  let result = true;
6166
6166
  Object.keys(where)
6167
6167
  .forEach(whereItem => {
6168
- if (item[whereItem] !== where[whereItem]) {
6169
- result = false;
6168
+ // item[whereItem] is not Array
6169
+ if (!Array.isArray(item[whereItem])) {
6170
+ const fieldValue = item[whereItem];
6171
+ if (!Array.isArray(where[whereItem])) {
6172
+ result = fieldValue === where[whereItem];
6173
+ }
6174
+ else {
6175
+ const whereValues = where[whereItem];
6176
+ result = !!whereValues.includes(fieldValue);
6177
+ }
6178
+ }
6179
+ else {
6180
+ // item[whereItem] is Array
6181
+ if (!Array.isArray(where[whereItem])) {
6182
+ result = item[whereItem].includes(where[whereItem]);
6183
+ }
6184
+ else {
6185
+ result = where[whereItem].every(subItem => item[whereItem].includes(subItem));
6186
+ }
6170
6187
  }
6171
6188
  });
6172
6189
  return result;