Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix: unselect layer not work properly (#266)
Browse files Browse the repository at this point in the history
fix selectLayer logic
  • Loading branch information
airslice authored Jul 8, 2022
1 parent 6468e2f commit eb41daf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/molecules/Visualizer/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ function useLayers({

const selectLayer = useCallback(
(id?: string, { reason, overriddenInfobox }: SelectLayerOptions = {}) => {
if (!id || !layers.findById(id)) return;
innerSelectLayer(id);
onSelect?.(id);
onSelect?.(id && !!layers.findById(id) ? id : undefined);
setSelectionReason(reason);
setPrimitiveOverridenInfobox(overriddenInfobox);
},
Expand Down

0 comments on commit eb41daf

Please sign in to comment.