Skip to content

Commit

Permalink
Use ?? instead of || in getPersistedProperty (#136)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Finstad <[email protected]>
  • Loading branch information
chfinst and Christian Finstad authored Dec 14, 2023
1 parent fc8aac6 commit 42183eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog-react-native/src/posthog-rn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class PostHog extends PostHogCore {

getPersistedProperty<T>(key: PostHogPersistedProperty): T | undefined {
return this._semiAsyncStorage
? this._semiAsyncStorage.getItem(key) || undefined
? this._semiAsyncStorage.getItem(key) ?? undefined
: this._memoryStorage.getProperty(key)
}
setPersistedProperty<T>(key: PostHogPersistedProperty, value: T | null): void {
Expand Down

0 comments on commit 42183eb

Please sign in to comment.