Fixed not correct call custom parseValueFunction in RPC widget

This commit is contained in:
Vladyslav_Prykhodko 2020-06-15 16:59:34 +03:00
parent 75fe3b31e7
commit 77a08e7c61
3 changed files with 3 additions and 3 deletions

View File

@ -320,7 +320,7 @@ export class LedIndicatorComponent extends PageComponent implements OnInit, OnDe
const keyData = data[0]; const keyData = data[0];
if (keyData && keyData.data && keyData.data[0]) { if (keyData && keyData.data && keyData.data[0]) {
const attrValue = keyData.data[0][1]; const attrValue = keyData.data[0][1];
if (attrValue) { if (isDefined(attrValue)) {
let parsed = null; let parsed = null;
try { try {
parsed = this.parseValueFunction(JSON.parse(attrValue)); parsed = this.parseValueFunction(JSON.parse(attrValue));

View File

@ -315,7 +315,7 @@ export class RoundSwitchComponent extends PageComponent implements OnInit, OnDes
const keyData = data[0]; const keyData = data[0];
if (keyData && keyData.data && keyData.data[0]) { if (keyData && keyData.data && keyData.data[0]) {
const attrValue = keyData.data[0][1]; const attrValue = keyData.data[0][1];
if (attrValue) { if (isDefined(attrValue)) {
let parsed = null; let parsed = null;
try { try {
parsed = this.parseValueFunction(JSON.parse(attrValue)); parsed = this.parseValueFunction(JSON.parse(attrValue));

View File

@ -333,7 +333,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
const keyData = data[0]; const keyData = data[0];
if (keyData && keyData.data && keyData.data[0]) { if (keyData && keyData.data && keyData.data[0]) {
const attrValue = keyData.data[0][1]; const attrValue = keyData.data[0][1];
if (attrValue) { if (isDefined(attrValue)) {
let parsed = null; let parsed = null;
try { try {
parsed = this.parseValueFunction(JSON.parse(attrValue)); parsed = this.parseValueFunction(JSON.parse(attrValue));