fix(core): fix issue with returnJsonArray helper breaking nodes that return no data

This commit is contained in:
Jonathan Bennetts 2022-09-12 16:30:47 +01:00 committed by GitHub
parent de4ca3b0cc
commit 3de0e228cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1326,7 +1326,7 @@ export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExe
}
jsonData.forEach((data: IDataObject & { json?: IDataObject }) => {
if (data.json) {
if (data?.json) {
// We already have the JSON key so avoid double wrapping
returnData.push({ ...data, json: data.json });
} else {