@lowentry/utils 1.23.3 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -361,9 +361,11 @@ var LeUtils = {
361
361
  if (a.toString !== Object.prototype.toString) {
362
362
  return a.toString() === b.toString();
363
363
  }
364
- var proto = Object.getPrototypeOf(a);
365
- if (a.constructor !== Object && a.constructor !== Array && proto !== Object.prototype && typeof a.equals === 'function') {
366
- return a.equals(b);
364
+ if (a.constructor && a.constructor !== Object && a.constructor !== Array && Object.getPrototypeOf(a) !== Object.prototype) {
365
+ if (typeof a.equals === 'function') {
366
+ return a.equals(b);
367
+ }
368
+ return false;
367
369
  }
368
370
  var keys = Object.keys(a);
369
371
  var length = keys.length;