mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
⚡ Do not allow that expressions return functions
This commit is contained in:
@@ -906,7 +906,9 @@ export class Workflow {
|
||||
// Execute the expression
|
||||
try {
|
||||
const returnValue = tmpl.tmpl(parameterValue, data);
|
||||
if (returnValue !== null && typeof returnValue === 'object') {
|
||||
if (typeof returnValue === 'function') {
|
||||
throw new Error('Expression resolved to a function. Please add "()"');
|
||||
} else if (returnValue !== null && typeof returnValue === 'object') {
|
||||
if (returnObjectAsString === true) {
|
||||
return this.convertObjectValueToString(returnValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user