react-fast-compare
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -6,3 +6,3 @@ 'use strict'; | ||
var hasProp = Object.prototype.hasOwnProperty; | ||
var inBrowser = typeof window === 'object'; | ||
var hasElementType = typeof Element !== 'undefined'; | ||
@@ -52,3 +52,3 @@ function equal(a, b) { | ||
// custom handling for DOM elements | ||
if (inBrowser && a instanceof Element && b instanceof Element) | ||
if (hasElementType && a instanceof Element && b instanceof Element) | ||
return a === b; | ||
@@ -84,4 +84,3 @@ | ||
} catch (error) { | ||
if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) | ||
{ | ||
if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) { | ||
// warn on circular references, don't crash | ||
@@ -88,0 +87,0 @@ // browsers give this different errors name and messages: |
{ | ||
"name": "react-fast-compare", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Fastest deep equal comparison for React. Perfect for shouldComponentUpdate. Also really fast general-purpose deep comparison", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11474
83