Skip to content

Commit

Permalink
Improve has()
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 6, 2022
1 parent c097746 commit 83482a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/config/normalize/lib/star_dot_path/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export const get = function (target, queryOrPath) {

// Check if a property is not missing according to a query
export const has = function (target, queryOrPath) {
const entries = listExistingEntries(target, queryOrPath)
return entries.length !== 0
return listEntries(target, queryOrPath).some(isExisting)
}

const listExistingEntries = function (target, queryOrPath) {
Expand Down

0 comments on commit 83482a7

Please sign in to comment.