Browse Source
Merge pull request #8413 from vvlladd28/bug/rule-node/test-node-script/parse-json
Fixed error when call test function in rule node
pull/8427/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
2 deletions
-
ui-ngx/src/app/core/services/script/node-script-test.service.ts
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|