From 712d71cac371464501a0cdfa62747e70985e0294 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Tue, 2 Nov 2021 02:17:46 +0700 Subject: [PATCH] Fix csv import on android --- src/routes/wish/_excelImport.svelte | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/routes/wish/_excelImport.svelte b/src/routes/wish/_excelImport.svelte index ca3f3fef..30aaf787 100644 --- a/src/routes/wish/_excelImport.svelte +++ b/src/routes/wish/_excelImport.svelte @@ -529,10 +529,10 @@ } const readFunc = { - 'default': readPaimonExcel, - 'takagg': readGachaExportExcel, - 'wishtally': readWishTallyExcel - } + default: readPaimonExcel, + takagg: readGachaExportExcel, + wishtally: readWishTallyExcel, + }; try { readFunc[selectedType](workbook); @@ -550,7 +550,11 @@ file.type === 'application/wps-office.xlsx' ) { readExcel(file); - } else if (file.type === 'text/csv' || file.type === 'application/vnd.ms-excel') { + } else if ( + file.type === 'text/csv' || + file.type === 'application/vnd.ms-excel' || + file.type === 'text/comma-separated-values' + ) { readCSV(file); } else { pushToast($t('wish.excel.errorInvalidFile'), 'error');