@infosoftas/s4-orders-js-sdk 0.1.4 → 0.1.5

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": "@infosoftas/s4-orders-js-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "scripts": {
5
5
  "build": "rimraf lib && webpack --mode production",
6
6
  "release": "release-it"
@@ -99,12 +99,14 @@ const useOrderForm = ({
99
99
  // TODO: "recievesInvoice" should be deleted in the future
100
100
  const receivesInvoice = invoiceResponse?.receivesInvoice || invoiceResponse?.recievesInvoice;
101
101
 
102
- userActionCallback?.(UserActionEnum.SEARCH_ORGANIZATION_NUMBER, {
103
- organizationNumber: data.organizationNumber,
104
- cvr: data.cvr,
105
- gln: data.gln,
106
- found: !!receivesInvoice
107
- });
102
+ if (invoiceResponse) {
103
+ userActionCallback?.(UserActionEnum.SEARCH_ORGANIZATION_NUMBER, {
104
+ organizationNumber: data.organizationNumber,
105
+ cvr: data.cvr,
106
+ gln: data.gln,
107
+ found: !!receivesInvoice
108
+ });
109
+ }
108
110
 
109
111
  if (invoiceResponse && !receivesInvoice) {
110
112
  setLoading(false);