Browse Source

Merge pull request #2958 from vvlladd28/bug/rpc-widget

[3.0] Fixed not correct call custom parseValueFunction in RPC widget
pull/3089/head
Igor Kulikov 6 years ago
committed by GitHub
parent
commit
a4022b33ea
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts
  3. 2
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts

2
ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts

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

2
ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts

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

2
ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts

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

Loading…
Cancel
Save