Mercurial > gemma
diff client/src/store/fairwayavailability.js @ 3215:3b36bb33f5b0
available_fairway_depth: omit empty lines after split by newline
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 09 May 2019 11:31:10 +0200 |
parents | ba7bc3740fb3 |
children | c2d753ef5aa1 |
line wrap: on
line diff
--- a/client/src/store/fairwayavailability.js Thu May 09 11:03:21 2019 +0200 +++ b/client/src/store/fairwayavailability.js Thu May 09 11:31:10 2019 +0200 @@ -75,7 +75,7 @@ }) .then(response => { const { data } = response; - const csv = data.split("\n"); + const csv = data.split("\n").filter(x => x !== ""); //omit empty lines commit("setLegend", csv.shift()); let transformed = csv.map(e => { const result = e.split(",");