@absolutejs/sync 1.18.1 → 1.18.2

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.js CHANGED
@@ -1832,13 +1832,20 @@ var createSyncEngine = (options = {}) => {
1832
1832
  oldestPerOrigin.set(entry.origin, entry.originVersion);
1833
1833
  }
1834
1834
  }
1835
+ const oldestLogVersion = changeLog[0]?.version;
1835
1836
  for (const [origin, lastSeen] of Object.entries(sinceVec)) {
1836
1837
  if (origin === instanceId) {
1837
1838
  if (lastSeen >= version)
1838
1839
  continue;
1839
1840
  const oldestLocal = oldestPerOrigin.get(instanceId);
1840
- if (oldestLocal === undefined || oldestLocal > lastSeen + 1)
1841
+ if (oldestLocal !== undefined) {
1842
+ if (oldestLocal > lastSeen + 1)
1843
+ return false;
1844
+ continue;
1845
+ }
1846
+ if (oldestLogVersion !== undefined && oldestLogVersion > lastSeen + 1) {
1841
1847
  return false;
1848
+ }
1842
1849
  } else {
1843
1850
  const oldestPeer = oldestPerOrigin.get(origin);
1844
1851
  if (oldestPeer === undefined) {
@@ -2986,5 +2993,5 @@ export {
2986
2993
  createPresenceHub
2987
2994
  };
2988
2995
 
2989
- //# debugId=8942CF1B0DE51E1664756E2164756E21
2996
+ //# debugId=34EB2D2EE376D7EC64756E2164756E21
2990
2997
  //# sourceMappingURL=index.js.map