@softwear/latestcollectioncore 1.0.151 → 1.0.152

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.
@@ -209,10 +209,17 @@ function aggregate({ beginTimestamp, endTimestamp, filterExpression, aggregation
209
209
  subtotalsForOuterGrouper,
210
210
  parentGroupTotals,
211
211
  });
212
- if (!beginStock)
213
- transactions.filter((t) => t.type != '0').forEach(compiledAggregator);
214
- else
215
- transactions.forEach(compiledAggregator);
212
+ if (!beginStock) {
213
+ for (const t of transactions) {
214
+ if (t.type != '0')
215
+ compiledAggregator(t);
216
+ }
217
+ }
218
+ else {
219
+ for (const t of transactions) {
220
+ compiledAggregator(t);
221
+ }
222
+ }
216
223
  return rawAggregations;
217
224
  }
218
225
  function whichShardsToProcess(dateRange, granularity) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwear/latestcollectioncore",
3
- "version": "1.0.151",
3
+ "version": "1.0.152",
4
4
  "description": "Core functions for LatestCollections applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -301,8 +301,15 @@ function aggregate({
301
301
  subtotalsForOuterGrouper,
302
302
  parentGroupTotals,
303
303
  })
304
- if (!beginStock) transactions.filter((t: TransactionI) => t.type != '0').forEach(compiledAggregator)
305
- else transactions.forEach(compiledAggregator)
304
+ if (!beginStock) {
305
+ for (const t of transactions) {
306
+ if (t.type != '0') compiledAggregator(t)
307
+ }
308
+ } else {
309
+ for (const t of transactions) {
310
+ compiledAggregator(t)
311
+ }
312
+ }
306
313
 
307
314
  return rawAggregations
308
315
  }