@powersync/web 1.38.0 → 1.38.1

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.
@@ -12388,7 +12388,7 @@ function requireDist () {
12388
12388
 
12389
12389
  var distExports = requireDist();
12390
12390
 
12391
- var version = "1.53.0";
12391
+ var version = "1.53.1";
12392
12392
  var PACKAGE = {
12393
12393
  version: version};
12394
12394
 
@@ -12572,6 +12572,7 @@ function injectable(source) {
12572
12572
  let waiter = undefined; // An active, waiting next() call.
12573
12573
  // A pending upstream event that couldn't be dispatched because inject() has been called before it was resolved.
12574
12574
  let pendingSourceEvent = null;
12575
+ let sourceFetchInFlight = false;
12575
12576
  let pendingInjectedEvents = [];
12576
12577
  const consumeWaiter = () => {
12577
12578
  const pending = waiter;
@@ -12580,6 +12581,7 @@ function injectable(source) {
12580
12581
  };
12581
12582
  const fetchFromSource = () => {
12582
12583
  const resolveWaiter = (propagate) => {
12584
+ sourceFetchInFlight = false;
12583
12585
  const active = consumeWaiter();
12584
12586
  if (active) {
12585
12587
  propagate(active);
@@ -12588,6 +12590,7 @@ function injectable(source) {
12588
12590
  pendingSourceEvent = propagate;
12589
12591
  }
12590
12592
  };
12593
+ sourceFetchInFlight = true;
12591
12594
  const nextFromSource = source.next();
12592
12595
  nextFromSource.then((value) => {
12593
12596
  sourceIsDone = value.done == true;
@@ -12614,7 +12617,9 @@ function injectable(source) {
12614
12617
  }
12615
12618
  // Nothing pending? Fetch from source
12616
12619
  waiter = { resolve, reject };
12617
- return fetchFromSource();
12620
+ if (!sourceFetchInFlight) {
12621
+ fetchFromSource();
12622
+ }
12618
12623
  });
12619
12624
  },
12620
12625
  inject: (event) => {