Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent 707a8f1 commit 7df106a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/config/normalize/lib/wild_wild_path_utils/include.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const pick = function (target, query) {
}

const pickEntry = function (target, { path, value }) {
return set(target, [path], value)
return set(target, path, value)
}

const returnTrue = function () {
Expand All @@ -35,11 +35,11 @@ export const exclude = function (target, query, condition) {
}

const excludeEntry = function (target, { path }) {
return remove(target, [path])
return remove(target, path)
}

const shouldExclude = function (condition, { path, query, missing }, target) {
const value = get(target, [path])
const value = get(target, path)
return condition({ path, query, value, missing })
}

Expand Down
4 changes: 2 additions & 2 deletions src/config/normalize/lib/wild_wild_path_utils/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const map = function (target, query, mapFunc) {
}

const mapEntry = function (mapFunc, target, { path, query, missing }) {
const value = get(target, [path])
const value = get(target, path)
const mappedValue = mapFunc({ path, query, value, missing })
return value === mappedValue ? target : set(target, [path], mappedValue)
return value === mappedValue ? target : set(target, path, mappedValue)
}

0 comments on commit 7df106a

Please sign in to comment.