Skip to content

Commit 273bf86

Browse files
committed
Revert "Update util find (#1205)" (fix #1286)
This reverts commit e556943.
1 parent b536fbd commit 273bf86

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/util.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,7 @@
77
* @return {*}
88
*/
99
export function find (list, f) {
10-
const { length } = list
11-
let index = 0
12-
let value
13-
while (++index < length) {
14-
value = list[index]
15-
if (f(value, index, list)) {
16-
return value
17-
}
18-
}
10+
return list.filter(f)[0]
1911
}
2012

2113
/**

0 commit comments

Comments
 (0)