Browse Source
Merge pull request #9795 from Dmitriymush/bug-fix/value-card-widget
Added additional check for string and empty string in value card widget.
pull/9813/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/cards/value-card-widget.component.ts
|
|
@ -183,7 +183,7 @@ export class ValueCardWidgetComponent implements OnInit, AfterViewInit, OnDestro |
|
|
const tsValue = getSingleTsValue(this.ctx.data); |
|
|
const tsValue = getSingleTsValue(this.ctx.data); |
|
|
let ts; |
|
|
let ts; |
|
|
let value; |
|
|
let value; |
|
|
if (tsValue && isDefinedAndNotNull(tsValue[1])) { |
|
|
if (tsValue && isDefinedAndNotNull(tsValue[1]) && tsValue[0] !== 0) { |
|
|
ts = tsValue[0]; |
|
|
ts = tsValue[0]; |
|
|
value = tsValue[1]; |
|
|
value = tsValue[1]; |
|
|
this.valueText = formatValue(value, this.decimals, this.units, false); |
|
|
this.valueText = formatValue(value, this.decimals, this.units, false); |
|
|
|