@bytebrand/export-cars 1.26.17 → 1.26.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.26.17",
3
+ "version": "1.26.18",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -35,7 +35,9 @@ export class FacebookShopExporter implements Exporter {
35
35
  const chunkData = chunk.data.filter(car => this.carService.filterCar(car, this.rulesService.rules));
36
36
 
37
37
  for (let i = 0; i < chunkData.length; i += 1) {
38
- const data = chunk.data[i];
38
+ // chunkData, not chunk.data: indexing the unfiltered array here used to
39
+ // re-admit cars that filterCar had just rejected (and drop valid ones).
40
+ const data = chunkData[i];
39
41
 
40
42
  // console.time(`Transform ${data.car._id}`);
41
43
  const items = await facebookShopTransformer.transform(data);