Skip to content

Commit

Permalink
Add leaves to get|has()
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent c09047c commit 81cab10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/config/normalize/lib/wild_wild_path/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ export const list = function (
export const get = function (
target,
query,
{ childFirst, roots, sort, classes, inherited } = {},
{ childFirst, roots, leaves, sort, classes, inherited } = {},
) {
const entry = getEntry(target, query, {
childFirst,
roots,
leaves,
sort,
classes,
inherited,
Expand All @@ -44,6 +45,7 @@ export const has = function (target, query, { classes, inherited } = {}) {
getEntry(target, query, {
childFirst: false,
roots: false,
leaves: false,
sort: false,
classes,
inherited,
Expand All @@ -55,11 +57,12 @@ export const has = function (target, query, { classes, inherited } = {}) {
const getEntry = function (
target,
query,
{ childFirst, roots, sort, classes, inherited },
{ childFirst, roots, leaves, sort, classes, inherited },
) {
return iterate(target, query, {
childFirst,
roots,
leaves,
sort,
missing: false,
classes,
Expand Down

0 comments on commit 81cab10

Please sign in to comment.