mol_plot_all 1.2.548 → 1.2.550

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
@@ -914,7 +914,9 @@ var $;
914
914
  }
915
915
  let result;
916
916
  try {
917
- if (left_proto && !Reflect.getPrototypeOf(left_proto))
917
+ if (!left_proto)
918
+ result = compare_pojo(left, right);
919
+ else if (!Reflect.getPrototypeOf(left_proto))
918
920
  result = compare_pojo(left, right);
919
921
  else if (Array.isArray(left))
920
922
  result = compare_array(left, right);
@@ -982,10 +984,18 @@ var $;
982
984
  function compare_pojo(left, right) {
983
985
  const left_keys = Object.getOwnPropertyNames(left);
984
986
  const right_keys = Object.getOwnPropertyNames(right);
985
- if (left_keys.length !== right_keys.length)
987
+ if (!compare_array(left_keys, right_keys))
986
988
  return false;
987
989
  for (let key of left_keys) {
988
- if (!$mol_compare_deep(left[key], Reflect.get(right, key)))
990
+ if (!$mol_compare_deep(left[key], right[key]))
991
+ return false;
992
+ }
993
+ const left_syms = Object.getOwnPropertySymbols(left);
994
+ const right_syms = Object.getOwnPropertySymbols(right);
995
+ if (!compare_array(left_syms, right_syms))
996
+ return false;
997
+ for (let key of left_syms) {
998
+ if (!$mol_compare_deep(left[key], right[key]))
989
999
  return false;
990
1000
  }
991
1001
  return true;