fix(ImportSitesModal): improve error handling for file reading in handleFileInput

This commit is contained in:
GitHub Actions
2026-01-31 21:08:51 +00:00
parent 5d7240537f
commit 68e267846e
2 changed files with 88 additions and 4 deletions

View File

@@ -29,10 +29,10 @@ export default function ImportSitesModal({ visible, onClose, onUploaded }: Props
try {
const text = await files[i].text()
newSites.push(text)
} catch (err) {
// ignore read errors for individual files
newSites.push('')
}
} catch (_err) {
// ignore read errors for individual files
newSites.push('')
}
}
if (newSites.length > 0) setSites(newSites)
}