@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowentry/utils",
3
- "version": "1.23.3",
3
+ "version": "1.24.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./index.js",
package/src/LeUtils.js CHANGED
@@ -158,10 +158,13 @@ export const LeUtils = {
158
158
  return a.toString() === b.toString();
159
159
  }
160
160
 
161
- const proto = Object.getPrototypeOf(a);
162
- if((a.constructor !== Object) && (a.constructor !== Array) && (proto !== Object.prototype) && (typeof a.equals === 'function'))
161
+ if(a.constructor && (a.constructor !== Object) && (a.constructor !== Array) && (Object.getPrototypeOf(a) !== Object.prototype))
163
162
  {
164
- return a.equals(b);
163
+ if(typeof a.equals === 'function')
164
+ {
165
+ return a.equals(b);
166
+ }
167
+ return false;
165
168
  }
166
169
 
167
170
  const keys = Object.keys(a);