Fix infinite file list load bug

This commit is contained in:
2024-09-29 21:40:04 +02:00
parent 5af07a9e35
commit eb497c7ccb

View File

@@ -46,12 +46,15 @@ const useFileManagement = (gitEnabled = false) => {
useEffect(() => {
const initializeFileSystem = async () => {
if (gitEnabled) {
await pullLatestChanges();
} else {
await loadFileList();
}
};
initializeFileSystem();
}, [pullLatestChanges, loadFileList]);
}, [gitEnabled]);
const handleFileSelect = async (filePath) => {
if (hasUnsavedChanges) {