mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-10-14 03:50:46 +02:00
⚡ Make n8n work with new version of convict
This commit is contained in:
1 parent
bed5195eb8
commit
5f96f01f24
1 file changed
+3
-3
@@ -95,14 +95,14 @@ export async function getConfigValue(configKey: string): Promise<string | boolea
|
||||
|
||||
// Get the environment variable
|
||||
const configSchema = config.getSchema();
|
||||
let currentSchema = configSchema.properties as IDataObject;
|
||||
let currentSchema = configSchema._cvtProperties as IDataObject;
|
||||
for (const key of configKeyParts) {
|
||||
if (currentSchema[key] === undefined) {
|
||||
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;
|
||||
} else {
|
||||
currentSchema = (currentSchema[key] as IDataObject).properties as IDataObject;
|
||||
currentSchema = (currentSchema[key] as IDataObject)._cvtProperties as IDataObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user