fix: do not evaluate when local path is null
This commit is contained in:
@@ -535,13 +535,22 @@ export const useCheckCompatibility = () => {
|
|||||||
cacheFormValuesRef.current = {};
|
cacheFormValuesRef.current = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const noLocalPathValue = (allValues: any) => {
|
||||||
|
return (
|
||||||
|
allValues.source === modelSourceMap.local_path_value &&
|
||||||
|
!allValues.local_path
|
||||||
|
);
|
||||||
|
};
|
||||||
const handleOnValuesChange = async (params: {
|
const handleOnValuesChange = async (params: {
|
||||||
changedValues: any;
|
changedValues: any;
|
||||||
allValues: any;
|
allValues: any;
|
||||||
source: string;
|
source: string;
|
||||||
}) => {
|
}) => {
|
||||||
const { allValues, source } = params;
|
const { allValues, source } = params;
|
||||||
if (_.isEqual(cacheFormValuesRef.current, allValues)) {
|
if (
|
||||||
|
_.isEqual(cacheFormValuesRef.current, allValues) ||
|
||||||
|
noLocalPathValue(allValues)
|
||||||
|
) {
|
||||||
console.log('No changes detected, skipping evaluation.');
|
console.log('No changes detected, skipping evaluation.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user