Skip to content

Commit

Permalink
Small fix: don't skip range updates (this would block changing the co…
Browse files Browse the repository at this point in the history
…llection path if the new and old ranges are the same)
  • Loading branch information
ikusteu committed Jan 16, 2024
1 parent 0a0619f commit 7e24a5c
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ export const updateSubscription: SubscribeFunction =
if (rangeInStore && rangeProperty === rangeInStore[0]) {
const [, storeRangeStart, storeRangeEnd] = rangeInStore;
switch (true) {
// exit early if ranges are the same
case rangeStart >= storeRangeStart && rangeEnd <= storeRangeEnd:
return;

// extend range in both directions: should happed rarely (or never) in production
case rangeStart < storeRangeStart && rangeEnd > storeRangeEnd:
// unsubscribe from old range
Expand Down

0 comments on commit 7e24a5c

Please sign in to comment.