From b5ba47f5b492f4194803db17f66f4b64e7027c0a Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 19 Feb 2025 15:05:56 +0800 Subject: [PATCH] fix: bug --- packages/core/client/src/variables/VariablesProvider.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/client/src/variables/VariablesProvider.tsx b/packages/core/client/src/variables/VariablesProvider.tsx index c904d0eb9f..56d488d239 100644 --- a/packages/core/client/src/variables/VariablesProvider.tsx +++ b/packages/core/client/src/variables/VariablesProvider.tsx @@ -67,7 +67,6 @@ const VariablesProvider = ({ children, filterVariables }: any) => { ctxRef.current = ctx; } }, []); - /** * 1. Get value from `ctx` based on `path` * 2. If a `key` does not exist and is an association field, fetch data from api and cache it in `ctx` @@ -91,7 +90,7 @@ const VariablesProvider = ({ children, filterVariables }: any) => { const list = variablePath.split('.'); const variableName = list[0]; const _variableToCollectionName = mergeVariableToCollectionNameWithLocalVariables(variablesStore, localVariables); - let current = mergeCtxWithLocalVariables(ctxRef.current, localVariables); + let current = mergeCtxWithLocalVariables(ctxRef.current, localVariables.concat(builtinVariables)); const { fieldPath, dataSource, variableOption } = getFieldPath(variableName, _variableToCollectionName); let collectionName = fieldPath;