willba-component-library 0.1.42 → 0.1.43
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/lib/index.js
CHANGED
|
@@ -4074,15 +4074,11 @@ var handleAgeCategoryRules = function (_a) {
|
|
|
4074
4074
|
ageCategories === null || ageCategories === void 0 ? void 0 : ageCategories.map(function (a) {
|
|
4075
4075
|
if (a.minVal) {
|
|
4076
4076
|
// Age categories rules
|
|
4077
|
-
|
|
4077
|
+
Object.entries(ageCategoryCounts).reduce(function (acc, c) {
|
|
4078
4078
|
return acc + c[1];
|
|
4079
4079
|
}, 0);
|
|
4080
4080
|
var ageCategory = ageCategoryCounts["guests-".concat(a.id)];
|
|
4081
|
-
if (!
|
|
4082
|
-
(totalAgeCategories === 1 && ageCategory === 1)) {
|
|
4083
|
-
ageCategoryCounts["guests-".concat(a.id)] = 2;
|
|
4084
|
-
}
|
|
4085
|
-
else if (totalAgeCategories > 1 && !ageCategory) {
|
|
4081
|
+
if (!ageCategory) {
|
|
4086
4082
|
ageCategoryCounts["guests-".concat(a.id)] = a.minVal;
|
|
4087
4083
|
}
|
|
4088
4084
|
}
|