mol_plot_all 1.2.222 → 1.2.223

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.esm.js CHANGED
@@ -2218,7 +2218,7 @@ var $;
2218
2218
  return suffix;
2219
2219
  }
2220
2220
  $.$mol_view_state_key = $mol_view_state_key;
2221
- const error_showed = new WeakSet();
2221
+ const error_shower = new WeakMap();
2222
2222
  class $mol_view extends $mol_object {
2223
2223
  static Root(id) {
2224
2224
  return new this;
@@ -2268,11 +2268,11 @@ var $;
2268
2268
  return this.sub();
2269
2269
  }
2270
2270
  minimal_width() {
2271
- const sub = this.sub();
2272
- if (!sub)
2273
- return 0;
2274
2271
  let min = 0;
2275
2272
  try {
2273
+ const sub = this.sub();
2274
+ if (!sub)
2275
+ return 0;
2276
2276
  sub.forEach(view => {
2277
2277
  if (view instanceof $mol_view) {
2278
2278
  min = Math.max(min, view.minimal_width());
@@ -2363,13 +2363,13 @@ var $;
2363
2363
  $mol_dom_render_attributes(node, { mol_view_error: error.name || error.constructor.name });
2364
2364
  if (error instanceof Promise)
2365
2365
  return node;
2366
- if (error_showed.has(error))
2366
+ if ((error_shower.get(error) ?? this) !== this)
2367
2367
  return node;
2368
2368
  try {
2369
2369
  node.innerText = '\xA0\xA0' + (error.message || error) + '\xA0\xA0';
2370
2370
  }
2371
2371
  catch { }
2372
- error_showed.add(error);
2372
+ error_shower.set(error, this);
2373
2373
  }
2374
2374
  return node;
2375
2375
  }