Skip to content

Commit 30f605a

Browse files
committed
🐛 Fix infinite validation loop in Dataverse solution import
- Remove onImportCompleted from useEffect dependency arrays (lines 173, 222, 304) - Remove onCDMChoiceSelected from useEffect dependency array (line 222) - Prevents infinite re-rendering when solution import completes or CDM choice is made - Fixes ERR_INSUFFICIENT_RESOURCES errors caused by rapid validation requests - Preserves all functionality while stopping callback-triggered loops
1 parent 266bdaf commit 30f605a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frontend/src/components/wizard/steps/file-upload/DataverseImport.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export const DataverseImport: React.FC<DataverseImportProps> = ({
219219

220220
onImportCompleted?.(importedContent, metadataWithChoice);
221221
}
222-
}, [cdmDetection.entities, setCDMChoice, onCDMChoiceSelected, importedContent, importedMetadata, updateWizardData, environmentUrl, selectedSolution]); // Removed onImportCompleted
222+
}, [cdmDetection.entities, setCDMChoice, importedContent, importedMetadata, updateWizardData, environmentUrl, selectedSolution]); // Removed onImportCompleted and onCDMChoiceSelected
223223

224224
// Render the diagram when CDM choice is made and we have content
225225
useEffect(() => {
@@ -301,7 +301,7 @@ export const DataverseImport: React.FC<DataverseImportProps> = ({
301301
} finally {
302302
setIsImporting(false);
303303
}
304-
}, [selectedSolution, environmentUrl, updateWizardData, onImportCompleted, detectCDMEntities, cdmDetection.detected]);
304+
}, [selectedSolution, environmentUrl, updateWizardData, detectCDMEntities, cdmDetection.detected]); // Removed onImportCompleted
305305

306306
return (
307307
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>

0 commit comments

Comments
 (0)