Skip to content

Commit

Permalink
Update useFlanksourceUISnippet.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jun 18, 2024
1 parent 5e808b6 commit 22210c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useFlanksourceUISnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function useFlanksourceUISnippet(
return;
}
const snippets = featureFlags?.find((flag) => {
return flag.name === "flanksource.ui.snippets" && flag.name === "local";
return flag.name === "flanksource.ui.snippets" && flag.source === "local";
});

if (snippets && user) {
Expand All @@ -31,7 +31,7 @@ export function useFlanksourceUISnippet(
} catch (error) {
console.error("Error executing snippet", error);
}
} else {
} else if (user) {
setIsSnippetExecuted(true);
}
}, [featureFlags, user, organization, isSnippetExecuted]);
Expand Down

0 comments on commit 22210c7

Please sign in to comment.