@adyen/kyc-components 2.9.0 → 2.9.1

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.
@@ -20344,15 +20344,17 @@ function getBaseTrackingPayload({
20344
20344
  }
20345
20345
  const removeOldDataBySchema = (dataSubmitted, savedLegalEntityData) => {
20346
20346
  Object.keys(savedLegalEntityData).forEach((formId) => {
20347
- Object.keys(savedLegalEntityData[formId]).forEach((key) => {
20348
- if (dataSubmitted[formId][key] === void 0) {
20349
- if (Array.isArray(savedLegalEntityData[formId][key])) {
20350
- dataSubmitted[formId][key] = [];
20351
- } else {
20352
- dataSubmitted[formId][key] = "";
20347
+ if (savedLegalEntityData[formId]) {
20348
+ Object.keys(savedLegalEntityData[formId]).forEach((key) => {
20349
+ if (dataSubmitted[formId][key] === void 0) {
20350
+ if (Array.isArray(savedLegalEntityData[formId][key])) {
20351
+ dataSubmitted[formId][key] = [];
20352
+ } else {
20353
+ dataSubmitted[formId][key] = "";
20354
+ }
20353
20355
  }
20354
- }
20355
- });
20356
+ });
20357
+ }
20356
20358
  });
20357
20359
  return dataSubmitted;
20358
20360
  };