-
Notifications
You must be signed in to change notification settings - Fork 43
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
chore: ref to allow sync storage friendlier #198
Conversation
Size Change: 0 B 🆕 Total Size: 0 B |
Definitely breaking changes but in good time if the approach is better for sync storages. |
} | ||
this.setupBootstrap(options) | ||
|
||
// It is possible that the old library was used so we try to get the legacy distinctID | ||
if (!this._semiAsyncStorage?.getItem(PostHogPersistedProperty.AnonymousId)) { | ||
if (!this._storage?.getItem(PostHogPersistedProperty.AnonymousId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically none of this applies if the storage isn't async - the only reason we do things the way we do with async storage is to have allowed people to move from the old native SDKs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this, and think fits my needs. Might be nitpicking or confused, the whole async vs non async storage feels irrelevant. Think should be a single type/usage etc. where an optional preloadPromise
can be implemented (as implemented on default storage). Not sure if that makes sense. I did something like that on my proposal PR for context #170
I don't care much really about changing anything, just some thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good to go
Teamwork and the community jumping in cc @filipef101 |
Problem
Tempt to fix #96
Changes
Release info Sub-libraries affected
Bump level
Libraries affected
Changelog notes