@shushed/helpers 0.0.203-bug-erp-770-20251208155555 → 0.0.203-bug-erp-770-20251208162807

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.
@@ -919,7 +919,11 @@ function transformMasterOrder(payload) {
919
919
  const created_at = g.entries
920
920
  .map(e => e.created_at)
921
921
  .filter(Boolean)
922
- .map(d => new Date(d).toISOString())
922
+ .map(d => {
923
+ const date = new Date(d);
924
+ return isNaN(date.getTime()) ? null : date.toISOString();
925
+ })
926
+ .filter((d) => d !== null)
923
927
  .sort()[0] || ordered_at;
924
928
  const amountInclVat = Math.max(...g.entries.map(e => Number(e.amount || 0)), 0);
925
929
  const amount = money(amountInclVat);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.203-bug-erp-770-20251208155555",
3
+ "version": "0.0.203-bug-erp-770-20251208162807",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",