Skip to content

Commit

Permalink
Revert "Update util find (#1205)" (fix #1286)
Browse files Browse the repository at this point in the history
This reverts commit e556943.
  • Loading branch information
ktsn committed May 27, 2018
1 parent b536fbd commit 273bf86
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@
* @return {*}
*/
export function find (list, f) {
const { length } = list
let index = 0
let value
while (++index < length) {
value = list[index]
if (f(value, index, list)) {
return value
}
}
return list.filter(f)[0]
}

/**
Expand Down

0 comments on commit 273bf86

Please sign in to comment.