mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 02:21:42 -08:00
🎨 Clean up some code
This commit is contained in:
parent
6d1be05f56
commit
1903a25bd6
|
@ -224,10 +224,10 @@ export class WorkflowExecute {
|
|||
*/
|
||||
async executeHook(hookName: string, parameters: any[]): Promise<void> { // tslint:disable-line:no-any
|
||||
if (this.additionalData.hooks === undefined) {
|
||||
return parameters[0];
|
||||
return;
|
||||
}
|
||||
if (this.additionalData.hooks[hookName] === undefined || this.additionalData.hooks[hookName]!.length === 0) {
|
||||
return parameters[0];
|
||||
return;
|
||||
}
|
||||
|
||||
for (const hookFunction of this.additionalData.hooks[hookName]!) {
|
||||
|
@ -235,7 +235,7 @@ export class WorkflowExecute {
|
|||
.catch((error) => {
|
||||
// Catch all errors here because when "executeHook" gets called
|
||||
// we have the most time no "await" and so the errors would so
|
||||
// not be uncaught by anything.
|
||||
// not be caught by anything.
|
||||
|
||||
// TODO: Add proper logging
|
||||
console.error(`There was a problem executing hook: "${hookName}"`);
|
||||
|
|
Loading…
Reference in a new issue