From f410dd302b38c0d10a05f032518789ef3b6691f8 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 20 Jul 2023 23:03:15 -0700 Subject: [PATCH] Fixes handling of fields specified via labels --- src/components/services/widget/container.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/services/widget/container.jsx b/src/components/services/widget/container.jsx index 4b8a06ca5..7d8833367 100644 --- a/src/components/services/widget/container.jsx +++ b/src/components/services/widget/container.jsx @@ -18,7 +18,8 @@ export default function Container({ error = false, children, service }) { const childrenArray = Array.isArray(children) ? children : [children]; let visibleChildren = childrenArray; - const fields = service?.widget?.fields; + let fields = service?.widget?.fields; + if (typeof service.widget.fields === 'string') fields = JSON.parse(service.widget.fields); const type = service?.widget?.type; if (fields && type) { // if the field contains a "." then it most likely contains a common loc value