refactor: Async functions don't need to explicitly return promises (no-changelog) (#6041)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-04-24 11:17:08 +00:00
committed by GitHub
parent 03be725cef
commit 308a94311f
31 changed files with 148 additions and 209 deletions

View File

@@ -792,7 +792,7 @@ export class WorkflowExecute {
}
if (gotCancel) {
return Promise.resolve();
return;
}
nodeSuccessData = null;
@@ -919,7 +919,7 @@ export class WorkflowExecute {
for (let tryIndex = 0; tryIndex < maxTries; tryIndex++) {
if (gotCancel) {
return Promise.resolve();
return;
}
try {
if (tryIndex !== 0) {
@@ -1175,10 +1175,8 @@ export class WorkflowExecute {
outputIndex
]) {
if (!workflow.nodes.hasOwnProperty(connectionData.node)) {
return Promise.reject(
new Error(
`The node "${executionNode.name}" connects to not found node "${connectionData.node}"`,
),
throw new Error(
`The node "${executionNode.name}" connects to not found node "${connectionData.node}"`,
);
}
@@ -1212,7 +1210,7 @@ export class WorkflowExecute {
]);
}
return Promise.resolve();
return;
})()
.then(async () => {
if (gotCancel && executionError === undefined) {