mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Added arrow function in below files (#4061)
This commit is contained in:
committed by
John-David Dalton
parent
580cd4cd1b
commit
136d5253e7
4
at.js
4
at.js
@@ -15,8 +15,6 @@ import baseAt from './.internal/baseAt.js'
|
||||
* at(object, ['a[0].b.c', 'a[1]'])
|
||||
* // => [3, 4]
|
||||
*/
|
||||
function at(...paths) {
|
||||
return baseAt(paths)
|
||||
}
|
||||
const at = (...paths) => baseAt(paths)
|
||||
|
||||
export default at
|
||||
|
||||
@@ -21,7 +21,7 @@ import isError from './isError.js'
|
||||
*/
|
||||
function attempt(func, ...args) {
|
||||
try {
|
||||
return func.apply(undefined, args)
|
||||
return func(...args)
|
||||
} catch (e) {
|
||||
return isError(e) ? e : new Error(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user