From b32771f4708cd736cb0a5962b0040ebc8c54a0d3 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sun, 18 Oct 2020 17:12:32 -0400 Subject: [PATCH] avoid fallthrough --- services/gunDB/rpc/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/gunDB/rpc/index.js b/services/gunDB/rpc/index.js index 38d04aa1..6cffc541 100644 --- a/services/gunDB/rpc/index.js +++ b/services/gunDB/rpc/index.js @@ -138,6 +138,10 @@ const put = async (rawPath, value) => { if (Array.isArray(theValue)) { await Promise.all(theValue.map(v => set(rawPath, v))) + + // Do not remove this return, an array is also an object + // eslint-disable-next-line no-useless-return + return } else if (Schema.isObj(theValue)) { const writes = mapValues(theValue, (v, k) => put(`${rawPath}.${k}`, v))