mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Postgres Node): Accommodate null values in query parameters for expressions (#13544)
This commit is contained in:
@@ -30,6 +30,16 @@ export function isJSON(str: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export function evaluateExpression(expression: NodeParameterValueType) {
|
||||
if (expression === undefined) {
|
||||
return '';
|
||||
} else if (expression === null) {
|
||||
return 'null';
|
||||
} else {
|
||||
return typeof expression === 'object' ? JSON.stringify(expression) : expression.toString();
|
||||
}
|
||||
}
|
||||
|
||||
export function stringToArray(str: NodeParameterValueType | undefined) {
|
||||
if (str === undefined) return [];
|
||||
return String(str)
|
||||
|
||||
Reference in New Issue
Block a user