mol_wire_lib 1.0.293 → 1.0.294

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
@@ -687,7 +687,7 @@ var $;
687
687
  return res;
688
688
  };
689
689
  result = Object.assign(result.then(put, put), {
690
- destructor: result['destructor']
690
+ destructor: result['destructor'] ?? (() => { })
691
691
  });
692
692
  handled.add(result);
693
693
  }
@@ -704,7 +704,7 @@ var $;
704
704
  if (this.cache === result)
705
705
  this.absorb();
706
706
  }), {
707
- destructor: result['destructor']
707
+ destructor: result['destructor'] ?? (() => { })
708
708
  });
709
709
  handled.add(result);
710
710
  }
@@ -900,6 +900,8 @@ var $;
900
900
  };
901
901
  }
902
902
  complete() {
903
+ if (this.cache instanceof Promise)
904
+ return;
903
905
  this.destructor();
904
906
  }
905
907
  put(next) {
@@ -1079,7 +1081,9 @@ var $;
1079
1081
  try {
1080
1082
  next[Symbol.toStringTag] = this[Symbol.toStringTag];
1081
1083
  }
1082
- catch { }
1084
+ catch {
1085
+ Object.defineProperty(next, Symbol.toStringTag, { value: this[Symbol.toStringTag] });
1086
+ }
1083
1087
  }
1084
1088
  if (this.sub_from < this.data.length) {
1085
1089
  if (!$mol_compare_deep(prev, next)) {