From 9c5521ba35eefa630eeac7e74c2d77c0b7d9d6ac Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 2 Aug 2023 08:04:16 -0700 Subject: [PATCH] Fix: handle service object not found --- src/components/services/widget/container.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/widget/container.jsx b/src/components/services/widget/container.jsx index 7d8833367..647742e15 100644 --- a/src/components/services/widget/container.jsx +++ b/src/components/services/widget/container.jsx @@ -19,7 +19,7 @@ export default function Container({ error = false, children, service }) { let visibleChildren = childrenArray; let fields = service?.widget?.fields; - if (typeof service.widget.fields === 'string') fields = JSON.parse(service.widget.fields); + if (typeof 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