fix: sys_var startwith 'sys.' not 'sys' #8421 (#8422)

Co-authored-by: wuling <wuling@ke.com>
This commit is contained in:
yanxiyue 2024-09-14 15:16:12 +08:00 committed by GitHub
parent 52857dc0a6
commit de7bc22649
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,7 +183,7 @@ const VarReferencePicker: FC<Props> = ({
const handleVarReferenceChange = useCallback((value: ValueSelector, varInfo: Var) => {
// sys var not passed to backend
const newValue = produce(value, (draft) => {
if (draft[1] && draft[1].startsWith('sys')) {
if (draft[1] && draft[1].startsWith('sys.')) {
draft.shift()
const paths = draft[0].split('.')
paths.forEach((p, i) => {