Skip to content

Commit

Permalink
fix: properly close the provider
Browse files Browse the repository at this point in the history
  • Loading branch information
nimdanitro committed Oct 29, 2024
1 parent 4e595a6 commit 9097f23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/src/FeatureFlags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const Provider = (props: PropsWithChildren) => {
email: userState.email,
};
OpenFeature.setContext(context);

return () => {
console.log("closing openfeature provider");
OpenFeature.close();
};
}, [userState]);

return <OpenFeatureProvider>{children}</OpenFeatureProvider>;
Expand Down

0 comments on commit 9097f23

Please sign in to comment.