opcjs-base 0.1.16-alpha → 0.1.18-alpha

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/dist/index.cjs CHANGED
@@ -16835,6 +16835,18 @@ var WebSocketReadableStream = class extends ReadableStream {
16835
16835
  return new Promise((resolve) => {
16836
16836
  this.notifyPull = () => {
16837
16837
  this.notifyPull = null;
16838
+ if (this.errored) {
16839
+ controller.error(this.errored);
16840
+ this.cleanup();
16841
+ } else {
16842
+ const chunk = this.buffer.shift();
16843
+ if (chunk !== void 0) {
16844
+ controller.enqueue(chunk);
16845
+ } else if (this.closed) {
16846
+ controller.close();
16847
+ this.cleanup();
16848
+ }
16849
+ }
16838
16850
  resolve();
16839
16851
  };
16840
16852
  });