You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{PRESERVE_REF}from"../symbols";functionclone(msg){// for each prop in msgif(value&&typeofvalue==="object"){if(value[PRESERVE_REF]){// store it by its key and delete the key}}// deep clone as today// for each prop in store restore refs in msg by key}}
Symbol must be available to the function node scope
Node authors attach a Symbol that Node-RED core uses to decided if it should keep references after cloning messages
Node-RED core or utils
In a node
Somewhere inside https://github.com/node-red/node-red/blob/main/packages/node_modules/%40node-red/util/lib/util.js#L98
Do something like shown below for each prop in the msg and store references before cloning and restore them after
Symbol must be available to the function node scope