@powersync/common 1.53.0 → 1.53.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.
package/dist/bundle.mjs CHANGED
@@ -10653,7 +10653,7 @@ function requireDist () {
10653
10653
 
10654
10654
  var distExports = requireDist();
10655
10655
 
10656
- var version = "1.53.0";
10656
+ var version = "1.53.1";
10657
10657
  var PACKAGE = {
10658
10658
  version: version};
10659
10659
 
@@ -10837,6 +10837,7 @@ function injectable(source) {
10837
10837
  let waiter = undefined; // An active, waiting next() call.
10838
10838
  // A pending upstream event that couldn't be dispatched because inject() has been called before it was resolved.
10839
10839
  let pendingSourceEvent = null;
10840
+ let sourceFetchInFlight = false;
10840
10841
  let pendingInjectedEvents = [];
10841
10842
  const consumeWaiter = () => {
10842
10843
  const pending = waiter;
@@ -10845,6 +10846,7 @@ function injectable(source) {
10845
10846
  };
10846
10847
  const fetchFromSource = () => {
10847
10848
  const resolveWaiter = (propagate) => {
10849
+ sourceFetchInFlight = false;
10848
10850
  const active = consumeWaiter();
10849
10851
  if (active) {
10850
10852
  propagate(active);
@@ -10853,6 +10855,7 @@ function injectable(source) {
10853
10855
  pendingSourceEvent = propagate;
10854
10856
  }
10855
10857
  };
10858
+ sourceFetchInFlight = true;
10856
10859
  const nextFromSource = source.next();
10857
10860
  nextFromSource.then((value) => {
10858
10861
  sourceIsDone = value.done == true;
@@ -10879,7 +10882,9 @@ function injectable(source) {
10879
10882
  }
10880
10883
  // Nothing pending? Fetch from source
10881
10884
  waiter = { resolve, reject };
10882
- return fetchFromSource();
10885
+ if (!sourceFetchInFlight) {
10886
+ fetchFromSource();
10887
+ }
10883
10888
  });
10884
10889
  },
10885
10890
  inject: (event) => {