fix: default context for painted door experiment
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.
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user