@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.
@@ -2023,11 +2023,24 @@ var RefundsService = /** @class */ (function () {
2023
2023
  }
2024
2024
  headers['X-Requested-With'] = 'XMLHttpRequest';
2025
2025
  if (csrfToken.content === null) {
2026
- headers['CSRF-Token'] = document.cookie.split(';').find((/**
2026
+ if (document.cookie.split(';').find((/**
2027
2027
  * @param {?} row
2028
2028
  * @return {?}
2029
2029
  */
2030
- function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2030
+ function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1] !== undefined) {
2031
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
2032
+ * @param {?} row
2033
+ * @return {?}
2034
+ */
2035
+ function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
2036
+ }
2037
+ else {
2038
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
2039
+ * @param {?} row
2040
+ * @return {?}
2041
+ */
2042
+ function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2043
+ }
2031
2044
  }
2032
2045
  else {
2033
2046
  headers['CSRF-Token'] = csrfToken.content;