pubsub
pubsub copied to clipboard
`samePageRef` compares references to the objects of PageRef
Hello
The samePageRef method points to object references rather then making match by value.

Expected adjustment:

Steps to Reproduce
- Create Aura component (A) for the standalone page (should be url addressable, implement
flexipage:availableForAllPageTypes) - For component (A) write custom logic to open the modal window through
overlayLib, dynamically instantiate another Aura component (B) and nest it into the modal body - Fire custom event via
pubSubfrom component (B), and try to handle it in component (A)
I'm using this with LWCs (i.e. not Aura components) and both pageRefs don't always have attributes either. I created a workaround where I added the recordId as a payload prop and compared it recordId of the receiving component.