Skip to content

Use expo-crypto for UUID on Expo, expose useGzipCompression option and fix JavaScript mode People flushing issue #288

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

Merged
merged 22 commits into from
May 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix storage module import
  • Loading branch information
Ben King committed Oct 8, 2024
commit 4caf791d66f3d6f5117f3dca06e0ab8b7abb517a
7 changes: 6 additions & 1 deletion javascript/mixpanel-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export class AsyncStorageAdapter {
constructor(storage) {
if (!storage) {
try {
this.storage = require("@react-native-async-storage/async-storage");
const storageModule = require("@react-native-async-storage/async-storage");
if (storageModule.default) {
this.storage = storageModule.default
} else {
this.storage = storageModule
}
} catch {
console.error(
"[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. Please run 'npm install @react-native-async-storage/async-storage' or follow the Mixpanel guide to set up your own Storage class."
Expand Down