Skip to content

Commit

Permalink
Fix to show topology view for unprivileged users
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-phillips-18 committed Mar 31, 2020
1 parent 87db3e7 commit 6741c28
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,15 @@ const Controller: React.FC<ControllerProps> = ({
serviceBinding,
trafficData,
}) => {
const secretCount = React.useRef<number>(0);
const secretCount = React.useRef<number>(-1);
const [helmResourcesMap, setHelmResourcesMap] = React.useState<HelmReleaseResourcesMap>(null);

React.useEffect(() => {
const count = resources?.secrets?.data?.length ?? 0;
if (count !== secretCount.current) {
if (
(resources.secrets?.loaded && count !== secretCount.current) ||
resources.secrets?.loadError
) {
secretCount.current = count;
if (count === 0) {
setHelmResourcesMap({});
Expand Down

0 comments on commit 6741c28

Please sign in to comment.