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

commands/set: fixed allowPartial bug

parent a5c73f67
Branches
Tags 0.1.15
No related merge requests found
Pipeline #17145 passed
{
"name": "usp-js",
"version": "0.1.14",
"version": "0.1.15",
"description": "Helper library for easy usp communication using mqtt over tcp or ws.",
"main": "build/src/index.js",
"scripts": {
......
......@@ -9,8 +9,8 @@ const isObject = (v) =>
typeof v === "object" && v.required !== undefined && v.value !== undefined;
const encode: EncodeFn = ({ value, path: initialPath }) => {
const allowPartial = value && value.allowPartial;
const isObj = typeof value === "object";
const allowPartial = isObj && value.allowPartial !== undefined ? value.allowPartial : false;
const attr = initialPath.split(".").pop() || "";
const pairs = isObj
? Object.entries(value as any[]).map(([k, v]) =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment