Use the opposite operator ("!==") instead.

This commit is contained in:
ZHITENGLI 2023-10-27 15:33:17 +08:00
parent f6defe8180
commit 307a72efaa
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ export function isPromise(obj: any): boolean {
}
export function isSame(x, y) {
if (!(typeof Object.is === 'function')) {
if (typeof Object.is !== 'function') {
if (x === y) {
// +0 != -0
return x !== 0 || 1 / x === 1 / y;