chore: fix get workspace setting

pull/2998/head
Steven 2 years ago
parent e602aeecc1
commit f2eb9f1b8f

@ -22,8 +22,8 @@ export const useWorkspaceSettingStore = create(
} }
set({ workspaceSettingByName: { ...get().workspaceSettingByName, [setting.name]: setting } }); set({ workspaceSettingByName: { ...get().workspaceSettingByName, [setting.name]: setting } });
}, },
getWorkspaceSettingByKey: (key: WorkspaceSettingKey) => { getWorkspaceSettingByKey: (key: WorkspaceSettingKey): WorkspaceSetting => {
return get().workspaceSettingByName[`${WorkspaceSettingPrefix}${key}`]; return get().workspaceSettingByName[`${WorkspaceSettingPrefix}${key}`] || WorkspaceSetting.fromPartial({});
}, },
})), })),
); );

Loading…
Cancel
Save