Small fixes and fix that some nodes changed incoming data

This commit is contained in:
Jan Oberhauser
2019-08-01 18:22:48 +02:00
parent fc4952f022
commit a8f1f9c0ba
10 changed files with 30 additions and 30 deletions

View File

@@ -515,6 +515,8 @@ export function getNodeWebhooks(workflow: Workflow, node: INode, additionalData:
continue;
}
nodeWebhookPath = nodeWebhookPath.toString();
if (nodeWebhookPath.charAt(0) === '/') {
nodeWebhookPath = nodeWebhookPath.slice(1);
}
@@ -530,7 +532,7 @@ export function getNodeWebhooks(workflow: Workflow, node: INode, additionalData:
}
returnData.push({
httpMethod: httpMethod as WebhookHttpMethod,
httpMethod: httpMethod.toString() as WebhookHttpMethod,
node: node.name,
path,
webhookDescription,

View File

@@ -688,7 +688,7 @@ export class Workflow {
* @returns {(string | undefined)}
* @memberof Workflow
*/
getSimpleParameterValue(node: INode, parameterValue: string | undefined, defaultValue?: string): string | undefined {
getSimpleParameterValue(node: INode, parameterValue: string | undefined, defaultValue?: boolean | number | string): boolean | number | string | undefined {
if (parameterValue === undefined) {
// Value is not set so return the default
return defaultValue;
@@ -704,7 +704,7 @@ export class Workflow {
}
};
return this.getParameterValue(parameterValue, runData, runIndex, itemIndex, node.name, connectionInputData) as string | undefined;
return this.getParameterValue(parameterValue, runData, runIndex, itemIndex, node.name, connectionInputData) as boolean | number | string | undefined;
}

View File

@@ -102,7 +102,6 @@ let nodeTypesInstance: NodeTypesClass | undefined;
export function NodeTypes(): NodeTypesClass {
if (nodeTypesInstance === undefined) {
nodeTypesInstance = new NodeTypesClass();
nodeTypesInstance.init({});
}
return nodeTypesInstance;