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
Fix error from adding blank target to external links (#2575)
## Motivation for the change, related issues
We use playground as a preview tool inside an app that generates
WordPress blocks via AI assistant. We encounter `JavaScript Error:
TypeError: e.target.closest is not a function` coming from Playground
and it encumbers our assisted error recovery because it comes from
outside of the generated code.
## Implementation details
We don't attempt to update the link if the element surprisingly doesn't
have a closest method (which is why we also log the element to see why
this happens)
## Testing Instructions (or ideally a Blueprint)
Hard to figure out, sometimes it occurs.
---------
Co-authored-by: Adam Zieliński <[email protected]>
0 commit comments