Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Jul 22, 2024
1 parent 7057596 commit 901fc01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/base/src/panelview/components/sources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ function SourceComponent(props: ISourceProps): JSX.Element {
if (!(gisModel?.getLayersBySource(sourceId).length ?? true)) {
setUnused(true);
}
}
};

gisModel?.sharedLayersChanged.connect(checkUsage);
checkUsage();

return () => {
gisModel?.sharedLayersChanged.disconnect(checkUsage);
}
};
}, [gisModel]);

/**
Expand Down

0 comments on commit 901fc01

Please sign in to comment.