Skip to content

Commit

Permalink
fix(pickup): fix list locations for disabled carriers staying visible
Browse files Browse the repository at this point in the history
When having carrier x enabled, loading pickup locations and then removing that carrier from the config, the loaded locations for that carrier would not disappear.
  • Loading branch information
EdieLemoine committed Sep 27, 2024
1 parent f0052a6 commit 4d83801
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ const callback = (): UseResolvedPickupLocations => {
});

const locations = addLoadingProperties(
computed(() => allLocations.value.sort(sortByDistance)),
computed(() => {
return allLocations.value
.filter((location) =>
carriersWithPickup.value.some(({carrier}) => carrier.value.identifier === location.carrier),
)
.sort(sortByDistance);
}),
currentLocations.load,
currentLocations.loading,
);
Expand Down

0 comments on commit 4d83801

Please sign in to comment.