Skip to content

Commit

Permalink
fix: default context for painted door experiment
Browse files Browse the repository at this point in the history
There are multiple places where attributes of the object provided by `usePaintedDoorExperimentContext()` are assumed to exist. This provides default (null) values for those attributes when creating the context.
  • Loading branch information
brian-smith-tcril committed Oct 18, 2023
1 parent 3cdcc1f commit b2f5a65
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ export const useIsEnterpriseUser = () => {
return enterpriseUser;
};

export const PaintedDoorExperimentContext = React.createContext();
export const PaintedDoorExperimentContext = React.createContext({
experimentVariation: null,
isPaintedDoorNavbarBtnVariation: null,
isPaintedDoorWidgetBtnVariation: null,
isPaintedDoorControlVariation: null,
experimentLoading: null,
});

export const PaintedDoorExperimentProvider = ({ children }) => {
const [experimentData, setExperimentData] = module.state.experimentData({
Expand Down

0 comments on commit b2f5a65

Please sign in to comment.