From 13ab79572c73d47172e812fae8baa8fe5ed70170 Mon Sep 17 00:00:00 2001 From: Simon Leigh Date: Thu, 24 Feb 2022 10:15:55 +0900 Subject: [PATCH] bug fixes --- .../components/Automations/actions/PropertySelect.tsx | 2 +- .../actions/UpdateDocActionConfigurator.tsx | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cloud/components/Automations/actions/PropertySelect.tsx b/src/cloud/components/Automations/actions/PropertySelect.tsx index f8c580e0e5..1e747f4f87 100644 --- a/src/cloud/components/Automations/actions/PropertySelect.tsx +++ b/src/cloud/components/Automations/actions/PropertySelect.tsx @@ -158,7 +158,7 @@ const PropertySelect = ({ type: prop.type, subType: prop.subType, data: null, - }) as SupportedType['val'] + }) ) } />, diff --git a/src/cloud/components/Automations/actions/UpdateDocActionConfigurator.tsx b/src/cloud/components/Automations/actions/UpdateDocActionConfigurator.tsx index c02da39977..6181f24c5e 100644 --- a/src/cloud/components/Automations/actions/UpdateDocActionConfigurator.tsx +++ b/src/cloud/components/Automations/actions/UpdateDocActionConfigurator.tsx @@ -42,14 +42,14 @@ const UpdateDocActionConfigurator = ({ } const propQueryAst = - configuration.info.refs.query !== null && + configuration.info.refs.query != null && configuration.info.refs.query.type === 'constructor' && configuration.info.refs.query.info.type === 'array' ? configuration.info.refs.query.info.refs : [] const contentAst = - configuration.info.refs.content !== null && + configuration.info.refs.content != null && configuration.info.refs.content.type === 'constructor' && configuration.info.refs.content.info.type === 'struct' ? configuration.info.refs.content.info.refs @@ -162,10 +162,11 @@ const UpdateDocActionConfigurator = ({ setContent({ props: RecordNode(props) })} eventDataOptions={eventDataOptions} @@ -190,7 +191,7 @@ function toQueryAST( value: StructNode({ name, type: val.input.info.refs.type, - value: val.input.info.refs.data, + value: val, }), rule: LiteralNode('string', 'and'), }) @@ -202,7 +203,7 @@ function toQueryAST( value: StructNode({ name, type: LiteralNode('string', val.value.type), - value: LiteralNode('propData', val.value.data), + value: LiteralNode('propData', val.value), }), rule: LiteralNode('string', 'and'), })