Skip to content

Commit

Permalink
Removed the warn message
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath-K-Shetty committed Jan 31, 2025
1 parent 91efe56 commit f985309
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/framework/esm-react-utils/src/useFeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ import { featureFlagsStore } from '@openmrs/esm-feature-flags';
export function useFeatureFlag(flagName: string) {
const { flags } = useStore(featureFlagsStore);

useEffect(() => {
if (flags[flagName] === undefined) {
console.warn(`useFeatureFlag: Flag "${flagName}" does not exist. Returning false.`);
}
}, [flags[flagName]]);

// Return false if flag does not exist or if it's off
return flags[flagName]?.enabled ?? false;
}

0 comments on commit f985309

Please sign in to comment.