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

User.anonymousId() returns an object instead of an ID #859

Open
disaacson opened this issue May 10, 2023 · 2 comments
Open

User.anonymousId() returns an object instead of an ID #859

disaacson opened this issue May 10, 2023 · 2 comments
Assignees

Comments

@disaacson
Copy link

The anonymousId method of User

anonymousId = (id?: ID): ID => {

has a return type of ID (type ID = string | null | undefined),
but is returning the following object instead
image

@disaacson
Copy link
Author

It looks like the anonymousId is currently accessed via
user.anonymousId().event.id in that object.

@disaacson
Copy link
Author

I tried it in a new incognito browser and the anonymousId() method is now returning a string. It looks like the behavior above is state dependent.
FWIW - I had previously tried to call alias. Perhaps that triggered the code path that resulted in the state above?

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

2 participants