Skip to content

Commit

Permalink
refactor: minor change to feature flag logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hmerritt committed Jan 27, 2024
1 parent 3334700 commit 48656c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/global/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ export const feature = (mode: FeatureFlags, options: FeatureOptions = {}): boole
return true;
}

let match = false;

// Feature is truthy in featureFlags{}
if (featureFlags[mode] && !isFalse(featureFlags[mode])) {
match = true;
return true;
}

return match;
return false;
};

export type FeatureOptions = {
Expand Down

0 comments on commit 48656c9

Please sign in to comment.