diff --git a/at.js b/at.js index 8b98e291e..a8b80227f 100644 --- a/at.js +++ b/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 diff --git a/attempt.js b/attempt.js index 8f792de79..ee6c48296 100644 --- a/attempt.js +++ b/attempt.js @@ -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) }