-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
BugSomething isn't workingSomething isn't working
Description
Hello,
If the preview UI tries to display a data structure with a circular structure it fails at JSON encoding, an uncaught exception gets thrown and the UI doesn't update.
This can happen for example in the following setting:
- define an
AllElementsClick
trigger - open the tracked website in debug / preview mode
- give an element on the page a reference to itself, e.g.
el.selfref = el;
- click that element
mtm.clickElement
will be pushed to the datalayer- And here is what I assume is happening: the preview UI tries to JSON encode the datalayer to display it and fails due to the circular structure caused by the self reference.
Of course the given example is a bit silly, however for example when a UI framework that binds a circular structure to the element is used this becomes an issue.
For instance, vue binds a __vue__
property to the root element of a component from which a circular structure is given via __vue__.$el
.
ZilvinasKucinskas
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working