diff --git a/packages/server/src/sdk/app/datasources/datasources.ts b/packages/server/src/sdk/app/datasources/datasources.ts index 25b05e351e..74c2ff7eb0 100644 --- a/packages/server/src/sdk/app/datasources/datasources.ts +++ b/packages/server/src/sdk/app/datasources/datasources.ts @@ -135,7 +135,7 @@ export function mergeConfigs(update: Datasource, old: Datasource) { // specific to REST datasources, fix the auth configs again if required if (hasAuthConfigs(update)) { const configs = update.config.authConfigs as RestAuthConfig[] - const oldConfigs = old.config?.authConfigs as RestAuthConfig[] || [] + const oldConfigs = (old.config?.authConfigs as RestAuthConfig[]) || [] for (let config of configs) { if (config.type !== RestAuthType.BASIC) { continue