Skip to content

Commit

Permalink
use if rather than ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeRx committed Dec 17, 2024
1 parent 44fb407 commit 41aac98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/hooks/snaps/useSnapSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export function useSnapSettings({ snapId }: { snapId?: string }) {
}
}
}
snapId && fetchPage(snapId);

if (snapId) {
fetchPage(snapId);
}

return () => {
cancelled = true;
};
Expand Down

0 comments on commit 41aac98

Please sign in to comment.