From 0e79f2ae4bf602d3728e9effa51fe17271544b7e Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 30 Sep 2016 22:31:24 +0800 Subject: [PATCH] fix tsv --- frontend/src/Metamaps/Import.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/Metamaps/Import.js b/frontend/src/Metamaps/Import.js index 193cdf5e..aa75b382 100644 --- a/frontend/src/Metamaps/Import.js +++ b/frontend/src/Metamaps/Import.js @@ -31,13 +31,12 @@ const Import = { cidMappings: {}, // to be filled by import_id => cid mappings handleTSV: function (text) { - var self = Import - results = self.parseTabbedString(text) - self.handle(results) + const results = Import.parseTabbedString(text) + Import.handle(results) }, handleCSV: function (text, parserOpts = {}) { - var self = Import + const self = Import const topicsRegex = /("?Topics"?)([\s\S]*)/mi const synapsesRegex = /("?Synapses"?)([\s\S]*)/mi @@ -71,9 +70,8 @@ const Import = { }, handleJSON: function (text) { - var self = Import - results = JSON.parse(text) - self.handle(results) + const results = JSON.parse(text) + Import.handle(results) }, handle: function(results) {