Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent 7c23613 commit e0eb3ca
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/config/normalize/lib/wild_wild_path/iterate.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ const iterateLevel = function (entries, index) {

const iteratePath = function ({ path, value, props }, index) {
const token = path[index]
const { tokenType, missing, value: valueA } = handleMissingValue(value, token)
const {
tokenType,
missing: missingParent,
value: valueA,
} = handleMissingValue(value, token)
const levelEntries = tokenType.iterate(valueA, token)
return levelEntries.map(({ value: childValue, prop, missing: missingA }) => ({
path,
value: childValue,
props: [...props, prop],
missing: missing || missingA,
}))
return levelEntries.map(
({ value: childValue, prop, missing: missingEntry }) => ({
path,
value: childValue,
props: [...props, prop],
missing: missingParent || missingEntry,
}),
)
}

// When the value does not exist, we set it deeply with `set()` but not with
Expand Down

0 comments on commit e0eb3ca

Please sign in to comment.