@happychef/algorithm 1.2.1 → 1.2.3

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.
@@ -166,10 +166,11 @@ function getMealType(time) {
166
166
  // Extract the maximum number of groups allowed for this threshold
167
167
  const maxAllowedCount = extractNumber(maxGroupSettings[limitSizeStr]);
168
168
  logDebug(` Max groups allowed for >=${limitSize} is: ${maxAllowedCount} (raw setting: ${JSON.stringify(maxGroupSettings[limitSizeStr])})`);
169
-
170
- // If the setting for this limit size is invalid (null or negative), treat it as 'no limit'
171
- if (maxAllowedCount === null || maxAllowedCount < 0) {
172
- logDebug(` Skipping check: Invalid or non-positive max count defined for size ${limitSize}.`);
169
+
170
+ // If the setting for this limit size is invalid (null, zero, or negative), treat it as 'no limit'
171
+ // IMPORTANT: A value of 0 means "unlimited" - don't apply this filter
172
+ if (maxAllowedCount === null || maxAllowedCount <= 0) {
173
+ logDebug(` Skipping check: Invalid or non-positive max count (${maxAllowedCount}) - treating as unlimited for size ${limitSize}.`);
173
174
  continue; // Skip to the next limitSize
174
175
  }
175
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happychef/algorithm",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Restaurant and reservation algorithm utilities",
5
5
  "main": "index.js",
6
6
  "author": "happy chef",