rerobe-js-orm 3.7.2 → 3.7.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.
@@ -1046,7 +1046,16 @@ class Product extends Base_1.default {
1046
1046
  }
1047
1047
  validateInventoryLocation(locationLike) {
1048
1048
  if (locationLike && Array.isArray(locationLike) && locationLike.length > 0) {
1049
- return locationLike.filter((v) => v && Object.keys(v).every((e) => ['id', 'name', 'availableAmount', 'incomingAmount'].includes(e)));
1049
+ return locationLike
1050
+ .filter((v) => v && v.id && v.name)
1051
+ .map((v) => {
1052
+ return {
1053
+ id: v.id,
1054
+ name: v.name,
1055
+ availableAmount: (v === null || v === void 0 ? void 0 : v.availableAmount) || 0,
1056
+ incomingAmount: (v === null || v === void 0 ? void 0 : v.incomingAmount) || 0,
1057
+ };
1058
+ });
1050
1059
  }
1051
1060
  return [];
1052
1061
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.7.2",
3
+ "version": "3.7.3",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",