Merge pull request #8413 from vvlladd28/bug/rule-node/test-node-script/parse-json
Fixed error when call test function in rule node
This commit is contained in:
commit
631f1db378
@ -46,10 +46,14 @@ export class NodeScriptTestService {
|
||||
let msgType: string;
|
||||
if (debugIn) {
|
||||
if (debugIn.data) {
|
||||
msg = JSON.parse(debugIn.data);
|
||||
try {
|
||||
msg = JSON.parse(debugIn.data);
|
||||
} catch (e) {}
|
||||
}
|
||||
if (debugIn.metadata) {
|
||||
metadata = JSON.parse(debugIn.metadata);
|
||||
try {
|
||||
metadata = JSON.parse(debugIn.metadata);
|
||||
} catch (e) {}
|
||||
}
|
||||
msgType = debugIn.msgType;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user