mol_plot_all 1.2.221 → 1.2.224

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": "mol_plot_all",
3
- "version": "1.2.221",
3
+ "version": "1.2.224",
4
4
  "main": "node.js",
5
5
  "module": "node.esm.js",
6
6
  "browser": "web.js",
package/web.esm.js CHANGED
@@ -1748,7 +1748,7 @@ var $;
1748
1748
  return suffix;
1749
1749
  }
1750
1750
  $.$mol_view_state_key = $mol_view_state_key;
1751
- const error_showed = new WeakSet();
1751
+ const error_shower = new WeakMap();
1752
1752
  class $mol_view extends $mol_object {
1753
1753
  static Root(id) {
1754
1754
  return new this;
@@ -1798,11 +1798,11 @@ var $;
1798
1798
  return this.sub();
1799
1799
  }
1800
1800
  minimal_width() {
1801
- const sub = this.sub();
1802
- if (!sub)
1803
- return 0;
1804
1801
  let min = 0;
1805
1802
  try {
1803
+ const sub = this.sub();
1804
+ if (!sub)
1805
+ return 0;
1806
1806
  sub.forEach(view => {
1807
1807
  if (view instanceof $mol_view) {
1808
1808
  min = Math.max(min, view.minimal_width());
@@ -1893,13 +1893,13 @@ var $;
1893
1893
  $mol_dom_render_attributes(node, { mol_view_error: error.name || error.constructor.name });
1894
1894
  if (error instanceof Promise)
1895
1895
  return node;
1896
- if (error_showed.has(error))
1896
+ if ((error_shower.get(error) ?? this) !== this)
1897
1897
  return node;
1898
1898
  try {
1899
1899
  node.innerText = '\xA0\xA0' + (error.message || error) + '\xA0\xA0';
1900
1900
  }
1901
1901
  catch { }
1902
- error_showed.add(error);
1902
+ error_shower.set(error, this);
1903
1903
  }
1904
1904
  return node;
1905
1905
  }