wt-front-shared 1.0.69 → 1.0.71

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,24 @@ 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
+ if (!Array.isArray(item[whereItem])) {
6169
+ const fieldValue = item[whereItem];
6170
+ if (!Array.isArray(where[whereItem])) {
6171
+ result = fieldValue === where[whereItem];
6172
+ }
6173
+ else {
6174
+ const whereValues = where[whereItem];
6175
+ result = !!whereValues.includes(fieldValue);
6176
+ }
6177
+ }
6178
+ else {
6179
+ // item[whereItem] is Array
6180
+ if (!Array.isArray(where[whereItem])) {
6181
+ result = item[whereItem].includes(where[whereItem]);
6182
+ }
6183
+ else {
6184
+ result = where[whereItem].some(subItem => item[whereItem].includes(subItem));
6185
+ }
6170
6186
  }
6171
6187
  });
6172
6188
  return result;