Replace getTag implementation by the one from baseGetTag (remove workarounds) (#4115)

This commit is contained in:
Luiz Américo
2018-12-11 12:53:23 -03:00
committed by John-David Dalton
parent c77650a17b
commit aa1d7d870d
15 changed files with 32 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
import baseGetTag from './.internal/baseGetTag.js'
import getTag from './.internal/getTag.js'
import isObjectLike from './isObjectLike.js'
import isPlainObject from './isPlainObject.js'
@@ -22,7 +22,7 @@ function isError(value) {
if (!isObjectLike(value)) {
return false
}
const tag = baseGetTag(value)
const tag = getTag(value)
return tag == '[object Error]' || tag == '[object DOMException]' ||
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value))
}