Skip to content

Commit

Permalink
fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Dec 14, 2023
1 parent 5cc2c24 commit 11c862d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/hooks/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ export function useTargetedPreviewLayers({
return useMemo(() => {
if (!active || !bbox || !features) return [];

const { layerSettings } = options;
const { layerSettings = {} } = options;

const FEATURES = features.filter((ft) => Object.keys(layerSettings).includes(ft.id));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ const SplitModal = ({
},
},
{
onSuccess: () => {
queryClient.invalidateQueries(['selected-features', sid]);
onSuccess: async () => {
await queryClient.invalidateQueries(['targeted-features', sid]);
await queryClient.invalidateQueries(['selected-features', sid]);
handleModal('split', false);
},
onError: () => {},
}
);
},
Expand Down Expand Up @@ -220,7 +220,7 @@ const SplitModal = ({
{(fprops) => (
<Field id="splitValues" {...fprops} className="relative">
<div className="flex justify-between">
<div className="modal-checkbox-list max-h-48 w-full space-y-2 overflow-y-auto">
<div className="modal-checkbox-list max-h-48 w-full space-y-2 overflow-y-auto pt-1">
{getSplitOptionValues(values.splitOption)?.map((value) => {
const checked = !!splitFeaturesSelected.find(
(sfs) => sfs.id === `${value.name}`
Expand Down
4 changes: 2 additions & 2 deletions app/layout/scenarios/edit/map/legend/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ export const useFeaturesLegend = () => {

const uniqueBinaryFeatures = [
...binaryFeaturesItems,
...targetedFeaturesByRange.binaryFeatures,
...(targetedFeaturesByRange?.binaryFeatures || []),
].filter(
(item, index, self) =>
index === self.findIndex((t) => JSON.stringify(t) === JSON.stringify(item))
);

const uniqueContinuousFeatures = [
...continuousFeaturesItems,
...targetedFeaturesByRange.continuousFeatures,
...(targetedFeaturesByRange?.continuousFeatures || []),
].filter(
(item, index, self) =>
index === self.findIndex((t) => JSON.stringify(t) === JSON.stringify(item))
Expand Down

0 comments on commit 11c862d

Please sign in to comment.