I’m using a Wait node in a test environment running n8n version 1.29.1. Believe our instance is using PostGresSQL.
The wait node is changing the value of the output from a previous node. Does anyone know why this is happening?
I have a workaround, which is calling the original $node[“example”] instead of using the data from the previous node, but sometimes I use a Wait node to aggregate multiple branches as a way to check if data exists without needing to call un-ran nodes. (Yes I’m aware that I could use a No Op or Set Node to do this but the flow needs a delay anyway so 2 birds 1 node right?) I wouldn’t know how to solve this then. Any suggestions?
EDIT: My coworker has suggested that it’s a function of the code where I set the data. He says he’s seen issues with map() functions but I’m not sure what I did wrong here as I’m not modifying existing arrays I’m creating a new new one.
const companySearchData1 = $('hsCompSearch').item.json?.results;
const companySearchData2 = $('hsCompSearch1').item.json?.results;
const contactSearchData1 = $('hsContactSearch').item.json?.results;
const contactSearchData2 = $('hsContactSearch1').item.json?.results;
const combinedCompanySearchData = [
...new Map(
[...companySearchData1, ...companySearchData2].map(company => [company.id, company])
).values()
]
const combinedContactSearchData = [
...new Map(
[...contactSearchData1, ...contactSearchData2].map(contact => [contact.id, contact])
).values()
]