perf: use === instead of == (#5118)

This commit is contained in:
Jacob
2021-04-24 01:25:37 +08:00
committed by GitHub
parent 540148d2c0
commit 2da024c3b4

View File

@@ -27,7 +27,7 @@ function baseToString(value) {
return symbolToString ? symbolToString.call(value) : ''
}
const result = `${value}`
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result
return (result === '0' && (1 / value) === -INFINITY) ? '-0' : result
}
export default baseToString