From acce78fb85966120b364fde7dddfc6ca85bba719 Mon Sep 17 00:00:00 2001 From: "ICX\\Tatsiana.Hashtold" Date: Thu, 12 Dec 2024 12:45:24 +0300 Subject: [PATCH] FIO-9339: fixed an issue where preview shows an error when editing component JSON --- src/WebformBuilder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WebformBuilder.js b/src/WebformBuilder.js index e7d872338b..1bd3319bf0 100644 --- a/src/WebformBuilder.js +++ b/src/WebformBuilder.js @@ -1444,7 +1444,8 @@ export default class WebformBuilder extends Component { helplinks: this.helplinks, })); this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`)); - this.updateComponent(this.editForm.submission.data ?? component); + const editFormData = this.editForm.submission?.data; + this.updateComponent(editFormData?.componentJson || editFormData || component); this.attachEditComponentControls(component, parent, isNew, original, ComponentClass); }); });