mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.4.0.
This commit is contained in:
@@ -30,8 +30,12 @@ var objectToString = objectProto.toString;
|
||||
* // => false
|
||||
*/
|
||||
function isError(value) {
|
||||
return isObjectLike(value) &&
|
||||
typeof value.message == 'string' && objectToString.call(value) == errorTag;
|
||||
if (!isObjectLike(value)) {
|
||||
return false;
|
||||
}
|
||||
var Ctor = value.constructor;
|
||||
return (objectToString.call(value) == errorTag) ||
|
||||
(typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag);
|
||||
}
|
||||
|
||||
export default isError;
|
||||
|
||||
Reference in New Issue
Block a user