mol_jsx_lib 0.0.397 → 0.0.398

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/web.mjs CHANGED
@@ -1116,7 +1116,9 @@ var $;
1116
1116
  }
1117
1117
  let result;
1118
1118
  try {
1119
- if (left_proto && !Reflect.getPrototypeOf(left_proto))
1119
+ if (!left_proto)
1120
+ result = compare_pojo(left, right);
1121
+ else if (!Reflect.getPrototypeOf(left_proto))
1120
1122
  result = compare_pojo(left, right);
1121
1123
  else if (Array.isArray(left))
1122
1124
  result = compare_array(left, right);
@@ -1184,10 +1186,18 @@ var $;
1184
1186
  function compare_pojo(left, right) {
1185
1187
  const left_keys = Object.getOwnPropertyNames(left);
1186
1188
  const right_keys = Object.getOwnPropertyNames(right);
1187
- if (left_keys.length !== right_keys.length)
1189
+ if (!compare_array(left_keys, right_keys))
1188
1190
  return false;
1189
1191
  for (let key of left_keys) {
1190
- if (!$mol_compare_deep(left[key], Reflect.get(right, key)))
1192
+ if (!$mol_compare_deep(left[key], right[key]))
1193
+ return false;
1194
+ }
1195
+ const left_syms = Object.getOwnPropertySymbols(left);
1196
+ const right_syms = Object.getOwnPropertySymbols(right);
1197
+ if (!compare_array(left_syms, right_syms))
1198
+ return false;
1199
+ for (let key of left_syms) {
1200
+ if (!$mol_compare_deep(left[key], right[key]))
1191
1201
  return false;
1192
1202
  }
1193
1203
  return true;