Skip to content

Commit

Permalink
Refactor: remove unused pre hook
Browse files Browse the repository at this point in the history
Closes #45.
  • Loading branch information
vweevers committed Nov 12, 2021
1 parent 48c683c commit ec92805
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,10 @@ Finder.prototype.startMenu = function (startEntry) {
}

// Transform and normalize paths, then record result
Finder.prototype.found = function (bin, metadata, method, cb, _skipPre) {
Finder.prototype.found = function (bin, metadata, method, cb) {
if (this.closed) return

if (typeof metadata === 'string') {
_skipPre = cb
cb = method
method = metadata
metadata = null
Expand All @@ -180,12 +179,6 @@ Finder.prototype.found = function (bin, metadata, method, cb, _skipPre) {
}

if (bin) {
if (this.pre && _skipPre !== false) {
return this.pre(bin, (bin) => {
this.found(bin, metadata, method, cb, false)
})
}

bin = path.normalize(bin)

const id = bin.toLowerCase()
Expand Down

0 comments on commit ec92805

Please sign in to comment.