Ensure _.attempt preserves custom errors.

This commit is contained in:
Ivan Tanev
2016-01-30 02:52:36 +02:00
committed by John-David Dalton
parent ac9b0bfc1b
commit 13659e87cb
2 changed files with 15 additions and 1 deletions

View File

@@ -12926,7 +12926,7 @@
try {
return apply(func, undefined, args);
} catch (e) {
return isError(e) ? e : new Error(e);
return isObject(e) ? e : new Error(e);
}
});