@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.
@@ -989,11 +989,24 @@ var WebComponentHttpClient = /** @class */ (function () {
989
989
  }
990
990
  headers['X-Requested-With'] = 'XMLHttpRequest';
991
991
  if (csrfToken === null) {
992
- headers['CSRF-Token'] = document.cookie.split(';').find((/**
992
+ if (document.cookie.split(';').find((/**
993
993
  * @param {?} row
994
994
  * @return {?}
995
995
  */
996
- function (row) { return row.startsWith(' XSRF-TOKEN'); })).split('=')[1];
996
+ function (row) { return row.startsWith('XSRF-TOKEN'); })).split('=')[1] !== 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
+ }
997
1010
  }
998
1011
  else {
999
1012
  headers['CSRF-Token'] = csrfToken.content;