mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-05 01:55:05 +08:00
Fix: Fixed an issue where adding session variables multiple times would overwrite them. (#11308)
### What problem does this PR solve? Fix: Fixed an issue where adding session variables multiple times would overwrite them. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -15,7 +15,8 @@ export const useHandleForm = () => {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleSubmit = useCallback(async (fieldValue: FieldValues) => {
|
const handleSubmit = useCallback(
|
||||||
|
async (fieldValue: FieldValues) => {
|
||||||
const param = {
|
const param = {
|
||||||
...(data.dsl?.variables || {}),
|
...(data.dsl?.variables || {}),
|
||||||
[fieldValue.name]: {
|
[fieldValue.name]: {
|
||||||
@ -35,7 +36,9 @@ export const useHandleForm = () => {
|
|||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
refetch();
|
refetch();
|
||||||
}
|
}
|
||||||
}, []);
|
},
|
||||||
|
[data.dsl?.variables, refetch, saveGraph],
|
||||||
|
);
|
||||||
|
|
||||||
return { handleSubmit, loading };
|
return { handleSubmit, loading };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user