ensure object before attempting to call function

This commit is contained in:
Steve-Mcl 2023-06-09 11:29:54 +01:00
parent 5d698d66d0
commit b102ef512e
1 changed files with 1 additions and 1 deletions

View File

@ -808,7 +808,7 @@ function handlePreRoute(flow, sendEvent, reportError) {
return;
} else if (err !== false) {
sendEvent.destination.node = flow.getNode(sendEvent.destination.id);
if (sendEvent.destination.node) {
if (sendEvent.destination.node && typeof sendEvent.destination.node === 'object') {
if (sendEvent.cloneMessage) {
sendEvent.msg = redUtil.cloneMessage(sendEvent.msg);
}