good morning, sorry for my english. I have a problem with a debug error. It always appears to me
"TypeError: Cannot read property 'substring' of undefined"
the function I have
var codice = msg.payload.rfin;
msg.payload = codice;
msg.payload = msg.payload.substring(12,msg.payload.length - 0);
if (msg.payload === "F5582B") {
var test = true ;
msg.payload = test;
return msg;
}else {
return [ null, msg ];
}
I thank you for help