mol_wire_lib 1.0.526 → 1.0.528

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/node.mjs CHANGED
@@ -804,7 +804,9 @@ var $;
804
804
  }
805
805
  let result;
806
806
  try {
807
- if (left_proto && !Reflect.getPrototypeOf(left_proto))
807
+ if (!left_proto)
808
+ result = compare_pojo(left, right);
809
+ else if (!Reflect.getPrototypeOf(left_proto))
808
810
  result = compare_pojo(left, right);
809
811
  else if (Array.isArray(left))
810
812
  result = compare_array(left, right);
@@ -872,10 +874,18 @@ var $;
872
874
  function compare_pojo(left, right) {
873
875
  const left_keys = Object.getOwnPropertyNames(left);
874
876
  const right_keys = Object.getOwnPropertyNames(right);
875
- if (left_keys.length !== right_keys.length)
877
+ if (!compare_array(left_keys, right_keys))
876
878
  return false;
877
879
  for (let key of left_keys) {
878
- if (!$mol_compare_deep(left[key], Reflect.get(right, key)))
880
+ if (!$mol_compare_deep(left[key], right[key]))
881
+ return false;
882
+ }
883
+ const left_syms = Object.getOwnPropertySymbols(left);
884
+ const right_syms = Object.getOwnPropertySymbols(right);
885
+ if (!compare_array(left_syms, right_syms))
886
+ return false;
887
+ for (let key of left_syms) {
888
+ if (!$mol_compare_deep(left[key], right[key]))
879
889
  return false;
880
890
  }
881
891
  return true;