Merge pull request #218 from shocknet/rpc-hotfix

avoid fallthrough
This commit is contained in:
Daniel Lugo 2020-10-18 17:13:26 -04:00 committed by GitHub
commit 49bd4f070f

View file

@ -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))