mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(workflow): remove a few ts-ignore and eslint-disable (#3958)
fix(workflow): remove a few `ts-ignore` and `eslint-disable`. improve typing
This commit is contained in:
committed by
GitHub
parent
712924cbc3
commit
a73ac1d94f
@@ -427,26 +427,26 @@ export function getParamterDependencies(
|
||||
): IParameterDependencies {
|
||||
const dependencies: IParameterDependencies = {};
|
||||
|
||||
let displayRule: string;
|
||||
let parameterName: string;
|
||||
for (const nodeProperties of nodePropertiesArray) {
|
||||
if (dependencies[nodeProperties.name] === undefined) {
|
||||
dependencies[nodeProperties.name] = [];
|
||||
const { name, displayOptions } = nodeProperties;
|
||||
|
||||
if (!dependencies[name]) {
|
||||
dependencies[name] = [];
|
||||
}
|
||||
if (nodeProperties.displayOptions === undefined) {
|
||||
|
||||
if (!displayOptions) {
|
||||
// Does not have any dependencies
|
||||
continue;
|
||||
}
|
||||
|
||||
for (displayRule of Object.keys(nodeProperties.displayOptions)) {
|
||||
// @ts-ignore
|
||||
for (parameterName of Object.keys(nodeProperties.displayOptions[displayRule])) {
|
||||
if (!dependencies[nodeProperties.name].includes(parameterName)) {
|
||||
for (const displayRule of Object.values(displayOptions)) {
|
||||
for (const parameterName of Object.keys(displayRule)) {
|
||||
if (!dependencies[name].includes(parameterName)) {
|
||||
if (parameterName.charAt(0) === '@') {
|
||||
// Is a special parameter so can be skipped
|
||||
continue;
|
||||
}
|
||||
dependencies[nodeProperties.name].push(parameterName);
|
||||
dependencies[name].push(parameterName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user