diff --git a/web/src/store/v1/workspaceSetting.ts b/web/src/store/v1/workspaceSetting.ts index 195838f03..555ef198b 100644 --- a/web/src/store/v1/workspaceSetting.ts +++ b/web/src/store/v1/workspaceSetting.ts @@ -22,8 +22,8 @@ export const useWorkspaceSettingStore = create( } set({ workspaceSettingByName: { ...get().workspaceSettingByName, [setting.name]: setting } }); }, - getWorkspaceSettingByKey: (key: WorkspaceSettingKey) => { - return get().workspaceSettingByName[`${WorkspaceSettingPrefix}${key}`]; + getWorkspaceSettingByKey: (key: WorkspaceSettingKey): WorkspaceSetting => { + return get().workspaceSettingByName[`${WorkspaceSettingPrefix}${key}`] || WorkspaceSetting.fromPartial({}); }, })), );