Mercurial > gemma
changeset 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 | 861329d535b2 |
children | ee6a4e8af766 |
files | client/.env client/src/main.js client/src/store/fairwayavailability.js |
diffstat | 3 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/.env Thu May 09 11:03:21 2019 +0200 +++ b/client/.env Thu May 09 11:31:10 2019 +0200 @@ -11,3 +11,4 @@ #Logos to be potentially loaded by the SPA. Can be left blank. VUE_APP_SECONDARY_LOGO_URL= VUE_APP_LOGO_FOR_PDF_URL= +VUE_APP_SILENCE_TRANSLATIONWARNINGS =
--- a/client/src/main.js Thu May 09 11:03:21 2019 +0200 +++ b/client/src/main.js Thu May 09 11:31:10 2019 +0200 @@ -173,12 +173,12 @@ faWindowMaximize, faCrosshairs ); - // register plugins Vue.use(GetTextPlugin, { translations: translations, availableLanguages: supportedLanguages, - defaultLanguage: defaultLanguage + defaultLanguage: defaultLanguage, + silent: process.env.VUE_APP_SILENCE_TRANSLATIONWARNINGS }); Vue.use(Snotify, { toast: { position: SnotifyPosition.centerBottom } }); Vue.use(ToggleButton);
--- 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(",");