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

This commit is contained in:
ZHITENGLI 2023-10-20 15:59:01 +08:00
parent 1a255a85f0
commit 012c3107be
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@
* IE浏览器没有Object.is
*/
export function isSame(x: any, y: any) {
if (!(typeof Object.is === 'function')) {
if (typeof Object.is !== 'function') {
if (x === y) {
// +0 != -0
return x !== 0 || 1 / x === 1 / y;