Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events fail to fire if a property value is an instance of a class without a no-param constructor #9

Open
CameronSabuda opened this issue Dec 5, 2024 · 0 comments

Comments

@CameronSabuda
Copy link

My team recently encountered a very edge case bug with this library after upgrading from the old Smart Tag SDK. If the value of a property is an instance of a class that lacks a no-param constructor (eg. PointerEvent), then the event will fail to fire. This is particularly problematic if using the async tagging as this will cause the PA SDK to wrongfully detect a tagging conflict, causing all subsequent events to not fire.

After some investigation, it appears the logic causing the issue is at src/utils/cloneobject.js:5 where it tries to call the constructor of the object.

We have managed to workaround this by ensuring that property values aren't instances of classes before passing them through to the SDK. I recognise that it would probably be highly unusual to have property values that trigger this issue, but perhaps it could be caught in a graceful manner that doesn't stop further events from being fired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant