@hmcts/ccpay-web-component 6.0.0-beta24 → 6.0.0-beta25

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.
@@ -1008,14 +1008,22 @@
1008
1008
  }));
1009
1009
  }
1010
1010
  headers['X-Requested-With'] = 'XMLHttpRequest';
1011
- if (csrfToken.content === null && document.cookie.split(';').find(( /**
1012
- * @param {?} row
1013
- * @return {?}
1014
- */function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
1015
- headers['CSRF-Token'] = document.cookie.split(';').find(( /**
1011
+ if (csrfToken === null) {
1012
+ if (document.cookie.split(';').find(( /**
1016
1013
  * @param {?} row
1017
1014
  * @return {?}
1018
- */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
1015
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
1016
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
1017
+ * @param {?} row
1018
+ * @return {?}
1019
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
1020
+ }
1021
+ else {
1022
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
1023
+ * @param {?} row
1024
+ * @return {?}
1025
+ */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
1026
+ }
1019
1027
  }
1020
1028
  else {
1021
1029
  headers['CSRF-Token'] = csrfToken.content;
@@ -2026,14 +2034,22 @@
2026
2034
  }));
2027
2035
  }
2028
2036
  headers['X-Requested-With'] = 'XMLHttpRequest';
2029
- if (csrfToken.content === null && document.cookie.split(';').find(( /**
2030
- * @param {?} row
2031
- * @return {?}
2032
- */function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
2033
- headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2037
+ if (csrfToken.content === null) {
2038
+ if (document.cookie.split(';').find(( /**
2034
2039
  * @param {?} row
2035
2040
  * @return {?}
2036
- */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2041
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
2042
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2043
+ * @param {?} row
2044
+ * @return {?}
2045
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
2046
+ }
2047
+ else {
2048
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2049
+ * @param {?} row
2050
+ * @return {?}
2051
+ */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2052
+ }
2037
2053
  }
2038
2054
  else {
2039
2055
  headers['CSRF-Token'] = csrfToken.content;