Skip to content

Commit 0caaac2

Browse files
committed
chore: remove useless fallback
1 parent 68878b6 commit 0caaac2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/stores/room-list-v3/section.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ export async function editSection(tag: string): Promise<void> {
9696
* @param tag - The tag of the section to delete.
9797
*/
9898
export async function deleteSection(tag: string): Promise<void> {
99-
const sectionData = SettingsStore.getValue("RoomList.CustomSectionData") || {};
99+
const sectionData = SettingsStore.getValue("RoomList.CustomSectionData");
100100
if (!sectionData[tag]) return;
101101

102102
const modal = Modal.createDialog(RemoveSectionDialog);
103103
const [shouldRemoveSection] = await modal.finished;
104104
if (!shouldRemoveSection) return;
105105

106106
// Remove the section from the ordered list of sections
107-
const orderedSections = SettingsStore.getValue("RoomList.OrderedCustomSections") || [];
107+
const orderedSections = SettingsStore.getValue("RoomList.OrderedCustomSections");
108108
const newOrderedSections = orderedSections.filter((sectionTag) => sectionTag !== tag);
109109
await SettingsStore.setValue("RoomList.OrderedCustomSections", null, SettingLevel.ACCOUNT, newOrderedSections);
110110

0 commit comments

Comments
 (0)