I am using node-red, the function node to generate some random matrix. However, every time when I deploy the node, the error "TypeError: Cannot read property 'push' of undefined" will appear, can someone help me to take a look at the code?
// Generate some random data
// See https://www.patrick-wied.at/static/heatmapjs/example-minimal-config.html
var len = 200;
msg.payload = [];
while (len--) {
var value = Math.floor(Math.random() * 100);
msg.payload.push(value);
}
return msg;