Skip to content

Commit

Permalink
Fix missing originator
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyInformation committed Sep 6, 2024
1 parent 3275478 commit 18b26c0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nodes/libs/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ class UibSockets {
return
}

if ( msg._uib && msg._uib.originator && (typeof msg._uib.originator === 'string') ) {
if ( msg?._uib?.originator && (typeof msg._uib.originator === 'string') ) {
// const eventName = `node-red-contrib-uibuilder/return/${msg._uib.originator}`
tiEvent.emit(`node-red-contrib-uibuilder/return/${msg._uib.originator}`, msg)
} else {
Expand Down Expand Up @@ -607,10 +607,8 @@ class UibSockets {
..._uib
}
}
} else {
// Remove msg._uib
delete msg._uib
}
// Do NOT remove msg._uib here!

if (_client) msg._client = _client

Expand Down Expand Up @@ -679,7 +677,6 @@ class UibSockets {
break
}
}

}

/** Add a new Socket.IO NAMESPACE (for each uib instance) - also creates std & ctrl and other listeners on connection
Expand Down

0 comments on commit 18b26c0

Please sign in to comment.