Skip to content
Snippets Groups Projects
Commit a10ac438 authored by Marin Karamihalev's avatar Marin Karamihalev
Browse files

revised msg parsing for sync operations

parent 9c81ef61
No related branches found
No related tags found
No related merge requests found
Pipeline #36991 failed
{
"name": "usp-js",
"version": "0.2.15",
"version": "0.2.16",
"description": "Helper library for easy usp communication using mqtt over tcp or ws.",
"main": "node/index.js",
"browser": "web/index.js",
......
......@@ -6,6 +6,8 @@ import * as util from "./util";
const decode: DecodeFn = (msg) => {
const data = util.searchAll(msg, "operationResults");
const output = util.search(data, 'reqOutputArgs');
if (output) return [output];
if (data && data.length === 1) return [util.unflatten(data[0])];
const unflattened = data.map((v) => util.unflatten(v));
return [unflattened];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment