Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix labs exploding when lab group is empty (#7290)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Dec 6, 2021
1 parent f410d52 commit eb05044
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
);
});

groups.get(LabGroup.Widgets).push(
groups.getOrCreate(LabGroup.Widgets, []).push(
<SettingsFlag name="enableWidgetScreenshots" level={SettingLevel.ACCOUNT} />,
);

groups.get(LabGroup.Experimental).push(
groups.getOrCreate(LabGroup.Experimental, []).push(
<SettingsFlag name="lowBandwidth" level={SettingLevel.DEVICE} />,
);

Expand All @@ -101,12 +101,12 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
<SettingsFlag name="showHiddenEventsInTimeline" level={SettingLevel.DEVICE} />,
);

groups.get(LabGroup.Analytics).push(
groups.getOrCreate(LabGroup.Analytics, []).push(
<SettingsFlag name="automaticErrorReporting" level={SettingLevel.DEVICE} />,
);

if (this.state.showHiddenReadReceipts) {
groups.get(LabGroup.Messaging).push(
groups.getOrCreate(LabGroup.Messaging, []).push(
<SettingsFlag name="feature_hidden_read_receipts" level={SettingLevel.DEVICE} />,
);
}
Expand Down

0 comments on commit eb05044

Please sign in to comment.