Hi, I have this bit of code in a function node. In line 1, I want to set the
lastTimestamp to now if the flow context store is not set, but it doesn't work.
If I do the same (line 2) without getting it from the flow context, it works. What am I doing wrong?
var lastTimestamp = new Date(flow.get("lastTimestamp")) || Date.now(); var now = Date.now(); msg.payload = lastTimestamp; msg.now = now; return msg;