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.
- package/esm2020/lib/core/+state/static-data/static-data.facade.mjs +1 -1
- package/esm2020/lib/core/+state/static-data/static-data.selectors.mjs +19 -3
- package/fesm2015/wt-front-shared.mjs +18 -2
- package/fesm2015/wt-front-shared.mjs.map +1 -1
- package/fesm2020/wt-front-shared.mjs +18 -2
- package/fesm2020/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -1
- package/lib/core/+state/static-data/static-data.selectors.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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]
|
|
6169
|
-
|
|
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;
|