@hmcts/ccpay-web-component 5.0.1-beta115 → 5.0.1-beta116

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.
@@ -1009,10 +1009,21 @@
1009
1009
  }
1010
1010
  headers['X-Requested-With'] = 'XMLHttpRequest';
1011
1011
  if (csrfToken === null) {
1012
- headers['CSRF-Token'] = document.cookie.split(';').find(( /**
1012
+ if (document.cookie.split(';').find(( /**
1013
1013
  * @param {?} row
1014
1014
  * @return {?}
1015
- */function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
1015
+ */function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1] !== 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
+ }
1016
1027
  }
1017
1028
  else {
1018
1029
  headers['CSRF-Token'] = csrfToken.content;