@hmcts/ccpay-web-component 5.0.1-beta112 → 5.0.1-beta113

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.
@@ -2033,10 +2033,21 @@
2033
2033
  }
2034
2034
  headers['X-Requested-With'] = 'XMLHttpRequest';
2035
2035
  if (csrfToken.content === null) {
2036
- headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2036
+ if (document.cookie.split(';').find(( /**
2037
2037
  * @param {?} row
2038
2038
  * @return {?}
2039
- */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2039
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1] !== undefined) {
2040
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2041
+ * @param {?} row
2042
+ * @return {?}
2043
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
2044
+ }
2045
+ else {
2046
+ headers['CSRF-Token'] = document.cookie.split(';').find(( /**
2047
+ * @param {?} row
2048
+ * @return {?}
2049
+ */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2050
+ }
2040
2051
  }
2041
2052
  else {
2042
2053
  headers['CSRF-Token'] = csrfToken.content;