Skip to content

Commit

Permalink
Fix custom DC for feature check (#4930)
Browse files Browse the repository at this point in the history
This change plays it safer on the feature check such that if there are
no feature flags (like in custom dc instances), this will just return
false.
  • Loading branch information
gmechali authored Feb 5, 2025
1 parent 7ed7b19 commit 57442e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/shared/feature_flags/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SCROLL_TO_TOP_FEATURE_FLAG = "scroll_to_top_button";
* @returns Bool describing if the feature is enabled
*/
export function isFeatureEnabled(featureName: string): boolean {
if (featureName in FEATURE_FLAGS) {
if (FEATURE_FLAGS && featureName in FEATURE_FLAGS) {
return FEATURE_FLAGS[featureName];
}
return false;
Expand Down

0 comments on commit 57442e2

Please sign in to comment.