@posiwise/admin-module 0.0.164 → 0.0.165

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.
@@ -1190,34 +1190,7 @@ class DomainConfigBuildComponent extends AppBaseComponent {
1190
1190
  }));
1191
1191
  });
1192
1192
  this.shardUrl = res?.config?.shard_url;
1193
- const fixedData = { ...this.data };
1194
- const ensureArrayField = (obj, key) => {
1195
- if (!obj || typeof obj !== 'object' || !Array.isArray(obj[key])) {
1196
- obj = { ...obj, [key]: [] };
1197
- }
1198
- return obj;
1199
- };
1200
- const keysWithItems = [
1201
- 'testimonials',
1202
- 'book_demo',
1203
- 'partners',
1204
- 'videos',
1205
- 'integrations',
1206
- 'usps',
1207
- 'ctas',
1208
- 'guides',
1209
- 'navbar',
1210
- 'footer_links'
1211
- ];
1212
- keysWithItems.forEach((key) => {
1213
- fixedData[key] = ensureArrayField(fixedData[key], 'items');
1214
- });
1215
- fixedData.ab_tests = Array.isArray(fixedData.ab_tests) ? fixedData.ab_tests : [];
1216
- fixedData.header = ensureArrayField(fixedData.header, 'sub_headings');
1217
- fixedData.contact_us = typeof fixedData.contact_us === 'object' && fixedData.contact_us !== null ? { ...fixedData.contact_us } : {};
1218
- fixedData.contact_us.questions = Array.isArray(fixedData.contact_us.questions) ? fixedData.contact_us.questions : [];
1219
- fixedData.contact_us.hubspot = Array.isArray(fixedData.contact_us.hubspot) ? fixedData.contact_us.hubspot : [];
1220
- this.form.patchValue(fixedData);
1193
+ this.form.patchValue(this.data);
1221
1194
  this.form.patchValue({
1222
1195
  cs_product_id: this.productsList.find(x => x.id === this.data?.cs_product_id),
1223
1196
  trial_product_id: this.productsList.find(x => x.id === this.data?.trial_product_id)