fix: do not evaluate when local path is null

This commit is contained in:
jialin
2025-07-30 11:12:13 +08:00
parent ada120c1b9
commit 8fa3941db9
+10 -1
View File
@@ -535,13 +535,22 @@ export const useCheckCompatibility = () => {
cacheFormValuesRef.current = {};
};
const noLocalPathValue = (allValues: any) => {
return (
allValues.source === modelSourceMap.local_path_value &&
!allValues.local_path
);
};
const handleOnValuesChange = async (params: {
changedValues: any;
allValues: any;
source: string;
}) => {
const { allValues, source } = params;
if (_.isEqual(cacheFormValuesRef.current, allValues)) {
if (
_.isEqual(cacheFormValuesRef.current, allValues) ||
noLocalPathValue(allValues)
) {
console.log('No changes detected, skipping evaluation.');
return;
}