Skip to content

Commit

Permalink
fix: maximum update depth
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Dec 4, 2024
1 parent 6c25ea3 commit 43c406a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useAvailableNamespaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useAvailableNamespaces() {
};

useEffect(() => {
if (error) {
if (error && Array.isArray(namespaces) && namespaces.length !== 0) {
setNamespaces([]);
return;
}
Expand Down

0 comments on commit 43c406a

Please sign in to comment.