mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Added arrow function in below files (#4061)
This commit is contained in:
committed by
John-David Dalton
parent
580cd4cd1b
commit
136d5253e7
@@ -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