diff --git a/src/actions/filesDropped/metadata.js b/src/actions/filesDropped/metadata.js index 2d713468c..b588f5a4e 100644 --- a/src/actions/filesDropped/metadata.js +++ b/src/actions/filesDropped/metadata.js @@ -2,7 +2,7 @@ import XLSX from "xlsx"; import { rgb } from "d3-color"; import { errorNotification, successNotification, warningNotification } from "../notifications"; import { ADD_EXTRA_METADATA } from "../types"; -import { parseCsvTsv } from "./parseCsvTsv"; +import { parseCsv } from "./parseCsv"; const handleMetadata = async (dispatch, getState, file) => { @@ -18,7 +18,7 @@ const handleMetadata = async (dispatch, getState, file) => { const sheetAsCsv = XLSX.utils.sheet_to_csv(firstSheet); /* Parse & interrogate the CSV file */ - const {errors, data, meta} = await parseCsvTsv(sheetAsCsv); + const {errors, data, meta} = await parseCsv(sheetAsCsv); if (errors.length) { console.error(errors); throw new Error(errors.map((e) => e.message).join(", ")); diff --git a/src/actions/filesDropped/parseCsvTsv.js b/src/actions/filesDropped/parseCsv.js similarity index 94% rename from src/actions/filesDropped/parseCsvTsv.js rename to src/actions/filesDropped/parseCsv.js index c3f099a42..b440420a7 100644 --- a/src/actions/filesDropped/parseCsvTsv.js +++ b/src/actions/filesDropped/parseCsv.js @@ -8,7 +8,7 @@ let Papa; /* lazyily imported once a file is dropped on */ * to the config, which may work * @param {string} csvString a string of delimited text */ -export const parseCsvTsv = async (csvString) => { +export const parseCsv = async (csvString) => { if (!Papa) Papa = (await import("papaparse")).default; return new Promise((resolve, reject) => { Papa.parse(csvString, {