-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This bug affects all previous versions of combine-json.
If a folder has the following structure:
/parent
child.json // { "x": "X", "y": "Y" }
/child/a.json
/child/b.json
/child/c.json
Depending on which one gets processed first, the result may be partial. For example if the order is this:
/child/a.json
child.json
/child/b.json
/child/c.json
Then whatever is set in a.json
is ignored. This is due to how lodash.set()
works:
const o = {}
_.set(o, ['a', 'b', 'c'], { foo_c: 'bar_c' })
// { a: { b: { c: { foo_c: "bar_c" } } } }
_.set(o, ['a', 'b'], { foo_b: 'bar_b' })
// { a: { b: foo_b: "bar_b" } } } }
// notice that foo_c disappeared!
Metadata
Metadata
Assignees
Labels
No labels