@stackedapp/utils 1.17.9 → 1.17.10
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/dist/conditions.js +5 -1
- package/package.json +1 -1
package/dist/conditions.js
CHANGED
|
@@ -1170,7 +1170,11 @@ const meetsCompletionConditions = ({ completionConditions, completionTrackers, p
|
|
|
1170
1170
|
}
|
|
1171
1171
|
// Evaluate contractInteractions completion trackers
|
|
1172
1172
|
if (conditions?.contractInteractions) {
|
|
1173
|
-
|
|
1173
|
+
const interactions = conditions.contractInteractions;
|
|
1174
|
+
const entries = Array.isArray(interactions)
|
|
1175
|
+
? interactions.map((c) => [c.id || '', c])
|
|
1176
|
+
: Object.entries(interactions);
|
|
1177
|
+
for (const [conditionId, condition] of entries) {
|
|
1174
1178
|
// Tracker now stores { amount: number, count: number }
|
|
1175
1179
|
// Default to { amount: 0, count: 0 } if missing
|
|
1176
1180
|
const rawTracker = completionTrackers?.contractInteractions?.[conditionId];
|