You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
fix(event processor / pending events store): Added a check before accessing localstorage to make it work for React Native (optimizely#359)
Summary:
React Native does not have localStorage. Added a check to make sure it does not throw error in react native. This is a temporary fix to make sure error is not thrown in React Native. Will implement a better fix in the future.
Test plan:
Manually tested thoroughly.
Copy file name to clipboardExpand all lines: packages/event-processor/CHANGELOG.MD
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
## [Unreleased]
8
8
Changes that have landed but are not yet released.
9
9
10
+
### Fixed
11
+
- Fixed a runtime error when accessing localstorage in `PendingEventsStore` when SDK is used in a React Native application. Pending events will still not be stored when SDK is used in React Native but no error will be thrown anymore.
0 commit comments