Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore(server): ignore unknown config module (#11926)

forehaloc831a2ab2f26
diff --git a/packages/backend/server/src/base/config/register.ts b/packages/backend/server/src/base/config/register.ts
index 9dfa905394..4153114969 100644
--- a/packages/backend/server/src/base/config/register.ts
+++ b/packages/backend/server/src/base/config/register.ts
@@ -243,6 +243,11 @@ function readConfigJSONOverrides(path: string) {
export function override(config: AppConfig, update: DeepPartial<AppConfig>) {
Object.keys(update).forEach(module => {
const moduleDescriptors = APP_CONFIG_DESCRIPTORS[module];
+ // ignore unknown config module
+ if (!moduleDescriptors) {
+ return;
+ }
+
const configKeys = new Set(Object.keys(moduleDescriptors));
const moduleConfig = config[module as keyof AppConfig];