diff --git a/lodash.src.js b/lodash.src.js index d94f1772c..2c685f422 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -10514,9 +10514,16 @@ * elements = []; * } */ - function attempt(func) { + function attempt() { + var length = arguments.length, + func = arguments[0]; + try { - return func.apply(undefined, baseSlice(arguments, 1)); + var args = Array(length ? length - 1 : 0); + while (--length > 0) { + args[length - 1] = arguments[length]; + } + return func.apply(undefined, args); } catch(e) { return isError(e) ? e : new Error(e); }