mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Code Node): Handle user code returning null and undefined (#5989)
fixes https://community.n8n.io/t/cannot-convert-undefined-or-null-to-object/25240
This commit is contained in:
committed by
GitHub
parent
ba5b4eb42f
commit
a3664de355
@@ -13,6 +13,7 @@ function isTraversable(maybe: unknown): maybe is IDataObject {
|
||||
*/
|
||||
export function standardizeOutput(output: IDataObject) {
|
||||
function standardizeOutputRecursive(obj: IDataObject, knownObjects = new WeakSet()): IDataObject {
|
||||
if (obj === undefined || obj === null) return obj;
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (!isTraversable(value)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user