Skip to content

Commit

Permalink
Merge pull request #4337 from guardian/fix/getFeatureSwitchActive
Browse files Browse the repository at this point in the history
FIX `getFeatureSwitchActive` to fallback to default value (not just cookie)
  • Loading branch information
twrichards authored Sep 27, 2024
2 parents 7ef9581 + ae111c4 commit 2b424de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const getFeatureSwitchActive = (key: string): boolean => {
if (match) {
return match[2] === "true";
}
return false;
return window._clientConfig.featureSwitches.find((featureSwitch) => featureSwitch.key === key)?.value === "true";
};

const CloseIcon = () =>
Expand Down

0 comments on commit 2b424de

Please sign in to comment.