We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b90ce2 commit cd9da63Copy full SHA for cd9da63
packages/core/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt
@@ -171,6 +171,11 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
171
Analytics.setSingletonInstance(
172
RNAnalytics.buildWithIntegrations(builder)
173
)
174
+ } catch(e2: IllegalStateException) {
175
+ // pass if the error is due to calling setSingletonInstance multiple times
176
+
177
+ // if you created singleton in native code already,
178
+ // you need to promise.resolve for RN to properly operate
179
} catch(e: Exception) {
180
return promise.reject("E_SEGMENT_ERROR", e)
181
}
0 commit comments