mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Async functions don't need to explicitly return promises (no-changelog) (#6041)
This commit is contained in:
committed by
GitHub
parent
03be725cef
commit
308a94311f
@@ -88,7 +88,7 @@ export class Code implements INodeType {
|
||||
try {
|
||||
result = await sandbox.runCodeAllItems();
|
||||
} catch (error) {
|
||||
if (!this.continueOnFail()) return Promise.reject(error);
|
||||
if (!this.continueOnFail()) throw error;
|
||||
result = [{ json: { error: error.message } }];
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ export class Code implements INodeType {
|
||||
try {
|
||||
result = await sandbox.runCodeEachItem(index);
|
||||
} catch (error) {
|
||||
if (!this.continueOnFail()) return Promise.reject(error);
|
||||
if (!this.continueOnFail()) throw error;
|
||||
returnData.push({ json: { error: error.message } });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user