From 6496c65fc4fc70602d00bfaf7fe70d6f06f8202f Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 7 Jul 2023 09:42:10 +0800 Subject: [PATCH] fix: error reported when open data scope (#2202) --- .../schema-settings/VariableInput/hooks/useVariableOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-settings/VariableInput/hooks/useVariableOptions.ts b/packages/core/client/src/schema-settings/VariableInput/hooks/useVariableOptions.ts index 7eac24291..436bfb760 100644 --- a/packages/core/client/src/schema-settings/VariableInput/hooks/useVariableOptions.ts +++ b/packages/core/client/src/schema-settings/VariableInput/hooks/useVariableOptions.ts @@ -12,7 +12,7 @@ export const useVariableOptions = ({ form, collectionField, rootCollection }: an const formVariabele = useFormVariable({ blockForm: form, schema, rootCollection }); const iterationVariabele = useIterationVariable({ blockForm: form, - currentCollection: collectionField.collectionName, + currentCollection: collectionField?.collectionName, schema, rootCollection, });