mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix issue with comments in last line
This commit is contained in:
@@ -102,7 +102,7 @@ return items;`,
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Execute the function code
|
// Execute the function code
|
||||||
items = (await vm.run(`module.exports = async function() {${functionCode}}()`, __dirname));
|
items = (await vm.run(`module.exports = async function() {${functionCode}\n}()`, __dirname));
|
||||||
// Do very basic validation of the data
|
// Do very basic validation of the data
|
||||||
if (items === undefined) {
|
if (items === undefined) {
|
||||||
throw new NodeOperationError(this.getNode(), 'No data got returned. Always return an Array of items!');
|
throw new NodeOperationError(this.getNode(), 'No data got returned. Always return an Array of items!');
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ return item;`,
|
|||||||
let jsonData: IDataObject;
|
let jsonData: IDataObject;
|
||||||
try {
|
try {
|
||||||
// Execute the function code
|
// Execute the function code
|
||||||
jsonData = await vm.run(`module.exports = async function() {${functionCode}}()`, __dirname);
|
jsonData = await vm.run(`module.exports = async function() {${functionCode}\n}()`, __dirname);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (this.continueOnFail()) {
|
if (this.continueOnFail()) {
|
||||||
returnData.push({json:{ error: error.message }});
|
returnData.push({json:{ error: error.message }});
|
||||||
|
|||||||
Reference in New Issue
Block a user