diff --git a/client/src/components/Collections/ImportCollectionModal.tsx b/client/src/components/Collections/ImportCollectionModal.tsx index f88ecfa6e..2cfc3df23 100644 --- a/client/src/components/Collections/ImportCollectionModal.tsx +++ b/client/src/components/Collections/ImportCollectionModal.tsx @@ -36,7 +36,7 @@ interface ImportCollectionModalProps { } /** The words for each way a file can fail; a switch, so a new way does not build without its words. */ -function errorText(error: CollectionFileError, t: TranslationFn, count: number): string { +function fileErrorText(error: CollectionFileError, t: TranslationFn, count: number): string { switch (error) { case 'too-large': return t('collections.file.errorTooLarge') @@ -278,7 +278,7 @@ export default function ImportCollectionModal({ const errorText = error === 'failed' ? (failedMessage ?? t('common.error')) - : error ? errorText(error, t, MAX_COLLECTION_FILE_PLACES) : null + : error ? fileErrorText(error, t, MAX_COLLECTION_FILE_PLACES) : null // A GPX of nothing but a track would make an empty list, which is never what was meant. const nothingToImport = (!!leftovers || !!map) && !!file && (map ? picked.size === 0 : file.places.length === 0)