mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
⚡ Make n8n work with new version of convict
This commit is contained in:
@@ -95,14 +95,14 @@ export async function getConfigValue(configKey: string): Promise<string | boolea
|
|||||||
|
|
||||||
// Get the environment variable
|
// Get the environment variable
|
||||||
const configSchema = config.getSchema();
|
const configSchema = config.getSchema();
|
||||||
let currentSchema = configSchema.properties as IDataObject;
|
let currentSchema = configSchema._cvtProperties as IDataObject;
|
||||||
for (const key of configKeyParts) {
|
for (const key of configKeyParts) {
|
||||||
if (currentSchema[key] === undefined) {
|
if (currentSchema[key] === undefined) {
|
||||||
throw new Error(`Key "${key}" of ConfigKey "${configKey}" does not exist`);
|
throw new Error(`Key "${key}" of ConfigKey "${configKey}" does not exist`);
|
||||||
} else if ((currentSchema[key]! as IDataObject).properties === undefined) {
|
} else if ((currentSchema[key]! as IDataObject)._cvtProperties === undefined) {
|
||||||
currentSchema = currentSchema[key] as IDataObject;
|
currentSchema = currentSchema[key] as IDataObject;
|
||||||
} else {
|
} else {
|
||||||
currentSchema = (currentSchema[key] as IDataObject).properties as IDataObject;
|
currentSchema = (currentSchema[key] as IDataObject)._cvtProperties as IDataObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user