@react-pakistan/util-functions 1.22.77 → 1.22.78

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.
@@ -72,11 +72,14 @@ const postQuoteInvoice = (_d) => __awaiter(void 0, [_d], void 0, function* ({ ca
72
72
  products, createdAt, phone, lastName, firstName, email, country, city, address, prisma, }) {
73
73
  let quoteInvoice;
74
74
  if (mode === 'Create') {
75
- const mappedServices = services.map((item) => {
76
- const itemToReturn = Object.assign({}, item);
77
- delete itemToReturn.mode;
78
- return itemToReturn;
79
- });
75
+ let mappedServices;
76
+ if (services.length) {
77
+ mappedServices = services.map((item) => {
78
+ const itemToReturn = Object.assign({}, item);
79
+ delete itemToReturn.mode;
80
+ return itemToReturn;
81
+ });
82
+ }
80
83
  if (customerId || companyId) {
81
84
  quoteInvoice = yield prisma.quoteInvoice.create({
82
85
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.22.77",
3
+ "version": "1.22.78",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {