Browse Source

UI: Added catch error when parsing incorrect debug message in rule node

pull/8413/head
Vladyslav_Prykhodko 3 years ago
parent
commit
0ee7dff7b4
  1. 8
      ui-ngx/src/app/core/services/script/node-script-test.service.ts

8
ui-ngx/src/app/core/services/script/node-script-test.service.ts

@ -46,10 +46,14 @@ export class NodeScriptTestService {
let msgType: string; let msgType: string;
if (debugIn) { if (debugIn) {
if (debugIn.data) { if (debugIn.data) {
msg = JSON.parse(debugIn.data); try {
msg = JSON.parse(debugIn.data);
} catch (e) {}
} }
if (debugIn.metadata) { if (debugIn.metadata) {
metadata = JSON.parse(debugIn.metadata); try {
metadata = JSON.parse(debugIn.metadata);
} catch (e) {}
} }
msgType = debugIn.msgType; msgType = debugIn.msgType;
} }

Loading…
Cancel
Save