@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.
@@ -988,16 +988,25 @@ var WebComponentHttpClient = /** @class */ (function () {
988
988
  }));
989
989
  }
990
990
  headers['X-Requested-With'] = 'XMLHttpRequest';
991
- if (csrfToken.content === null && document.cookie.split(';').find((/**
992
- * @param {?} row
993
- * @return {?}
994
- */
995
- function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
996
- headers['CSRF-Token'] = document.cookie.split(';').find((/**
991
+ if (csrfToken === null) {
992
+ if (document.cookie.split(';').find((/**
997
993
  * @param {?} row
998
994
  * @return {?}
999
995
  */
1000
- function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
996
+ function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
997
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
998
+ * @param {?} row
999
+ * @return {?}
1000
+ */
1001
+ function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
1002
+ }
1003
+ else {
1004
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
1005
+ * @param {?} row
1006
+ * @return {?}
1007
+ */
1008
+ function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
1009
+ }
1001
1010
  }
1002
1011
  else {
1003
1012
  headers['CSRF-Token'] = csrfToken.content;
@@ -2017,16 +2026,25 @@ var RefundsService = /** @class */ (function () {
2017
2026
  }));
2018
2027
  }
2019
2028
  headers['X-Requested-With'] = 'XMLHttpRequest';
2020
- if (csrfToken.content === null && document.cookie.split(';').find((/**
2021
- * @param {?} row
2022
- * @return {?}
2023
- */
2024
- function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
2025
- headers['CSRF-Token'] = document.cookie.split(';').find((/**
2029
+ if (csrfToken.content === null) {
2030
+ if (document.cookie.split(';').find((/**
2026
2031
  * @param {?} row
2027
2032
  * @return {?}
2028
2033
  */
2029
- function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2034
+ function (row) { return row.startsWith('XSRF-TOKEN'); })) !== undefined) {
2035
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
2036
+ * @param {?} row
2037
+ * @return {?}
2038
+ */
2039
+ function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1];
2040
+ }
2041
+ else {
2042
+ headers['CSRF-Token'] = document.cookie.split(';').find((/**
2043
+ * @param {?} row
2044
+ * @return {?}
2045
+ */
2046
+ function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
2047
+ }
2030
2048
  }
2031
2049
  else {
2032
2050
  headers['CSRF-Token'] = csrfToken.content;