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.test.js CHANGED
@@ -2210,7 +2210,7 @@ var $;
2210
2210
  return suffix;
2211
2211
  }
2212
2212
  $.$mol_view_state_key = $mol_view_state_key;
2213
- const error_showed = new WeakSet();
2213
+ const error_shower = new WeakMap();
2214
2214
  class $mol_view extends $mol_object {
2215
2215
  static Root(id) {
2216
2216
  return new this;
@@ -2260,11 +2260,11 @@ var $;
2260
2260
  return this.sub();
2261
2261
  }
2262
2262
  minimal_width() {
2263
- const sub = this.sub();
2264
- if (!sub)
2265
- return 0;
2266
2263
  let min = 0;
2267
2264
  try {
2265
+ const sub = this.sub();
2266
+ if (!sub)
2267
+ return 0;
2268
2268
  sub.forEach(view => {
2269
2269
  if (view instanceof $mol_view) {
2270
2270
  min = Math.max(min, view.minimal_width());
@@ -2355,13 +2355,13 @@ var $;
2355
2355
  $mol_dom_render_attributes(node, { mol_view_error: error.name || error.constructor.name });
2356
2356
  if (error instanceof Promise)
2357
2357
  return node;
2358
- if (error_showed.has(error))
2358
+ if ((error_shower.get(error) ?? this) !== this)
2359
2359
  return node;
2360
2360
  try {
2361
2361
  node.innerText = '\xA0\xA0' + (error.message || error) + '\xA0\xA0';
2362
2362
  }
2363
2363
  catch { }
2364
- error_showed.add(error);
2364
+ error_shower.set(error, this);
2365
2365
  }
2366
2366
  return node;
2367
2367
  }