From 4ab802e9898d3ed873b19b6b0bd6a2941e7f2afd Mon Sep 17 00:00:00 2001 From: "francois.grand" <francois.grand@irstea.fr> Date: Wed, 13 Sep 2017 11:23:21 +0200 Subject: [PATCH] =?UTF-8?q?composant=20CalculatorResultsComponent=20:=20co?= =?UTF-8?q?rrection=20d'un=20bug=20d'affichage=20des=20param=C3=A8tres=20s?= =?UTF-8?q?ans=20label=20ou=20unit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculator-results/calculator-results.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/calculator-results/calculator-results.component.ts b/src/app/components/calculator-results/calculator-results.component.ts index a586149bb..487760c02 100644 --- a/src/app/components/calculator-results/calculator-results.component.ts +++ b/src/app/components/calculator-results/calculator-results.component.ts @@ -126,7 +126,12 @@ export class CalculatorResultsComponent { } private paramLabel(p: NgParameter): string { - return p.symbol + ": " + p.label + " (" + p.unit + ")"; + let res = p.symbol; + if (p.label != undefined && p.label != "") + res += ": " + p.label; + if (p.unit != undefined && p.unit != "") + res += " (" + p.unit + ")"; + return res; } // public show() { -- GitLab