Commit 77a08e7c61ec2743241c9d0bb6da453ea19a5eb4
1 parent
75fe3b31
Fixed not correct call custom parseValueFunction in RPC widget
Showing
3 changed files
with
3 additions
and
3 deletions
... | ... | @@ -320,7 +320,7 @@ export class LedIndicatorComponent extends PageComponent implements OnInit, OnDe |
320 | 320 | const keyData = data[0]; |
321 | 321 | if (keyData && keyData.data && keyData.data[0]) { |
322 | 322 | const attrValue = keyData.data[0][1]; |
323 | - if (attrValue) { | |
323 | + if (isDefined(attrValue)) { | |
324 | 324 | let parsed = null; |
325 | 325 | try { |
326 | 326 | parsed = this.parseValueFunction(JSON.parse(attrValue)); | ... | ... |
... | ... | @@ -315,7 +315,7 @@ export class RoundSwitchComponent extends PageComponent implements OnInit, OnDes |
315 | 315 | const keyData = data[0]; |
316 | 316 | if (keyData && keyData.data && keyData.data[0]) { |
317 | 317 | const attrValue = keyData.data[0][1]; |
318 | - if (attrValue) { | |
318 | + if (isDefined(attrValue)) { | |
319 | 319 | let parsed = null; |
320 | 320 | try { |
321 | 321 | parsed = this.parseValueFunction(JSON.parse(attrValue)); | ... | ... |
... | ... | @@ -333,7 +333,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy |
333 | 333 | const keyData = data[0]; |
334 | 334 | if (keyData && keyData.data && keyData.data[0]) { |
335 | 335 | const attrValue = keyData.data[0][1]; |
336 | - if (attrValue) { | |
336 | + if (isDefined(attrValue)) { | |
337 | 337 | let parsed = null; |
338 | 338 | try { |
339 | 339 | parsed = this.parseValueFunction(JSON.parse(attrValue)); | ... | ... |