This commit is contained in:
@@ -75,7 +75,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
console.log("Upload file is:", this.uploadFile);
|
||||
let fileType = this.uploadFile.type.toLowerCase();
|
||||
if (!fileType.includes("csv") && !fileType.includes("json")) {
|
||||
throw new Error("Not supported file type, must be .csv or .json");
|
||||
@@ -209,7 +208,6 @@ async function populateSelectionLists(vm) {
|
||||
// Parse csv and return results as JSON, handle errors if any
|
||||
//
|
||||
async function parseCSVFile(file) {
|
||||
Papa.parsePromise = function(file) {
|
||||
return new Promise(function(complete, error) {
|
||||
Papa.parse(file, {
|
||||
header: true,
|
||||
@@ -219,14 +217,6 @@ async function parseCSVFile(file) {
|
||||
error
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
let results;
|
||||
await Papa.parsePromise(file).then(function(parsedData) {
|
||||
results = parsedData;
|
||||
});
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user