Skip to content

Commit 0b57723

Browse files
Update TalkingData.java
1 parent 0ecad0c commit 0b57723

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

  • lib/AppAnalytics/android/src/main/java/com/talkingdata/appanalytics

lib/AppAnalytics/android/src/main/java/com/talkingdata/appanalytics/TalkingData.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,7 @@ public void getDeviceID(Promise callback) {
134134
*/
135135
@ReactMethod
136136
public void onEvent(String eventId, String eventLabel, ReadableMap map) {
137-
if (!TextUtils.isEmpty(eventId) && !TextUtils.isEmpty(eventLabel) && map != null && !map.toHashMap().isEmpty()){
138-
TCAgent.onEvent(context,eventId,eventLabel,map.toHashMap());
139-
}else if (!TextUtils.isEmpty(eventId) && !TextUtils.isEmpty(eventLabel) && (map == null || map.toHashMap().isEmpty())){
140-
TCAgent.onEvent(context,eventId,eventLabel);
141-
}else if (!TextUtils.isEmpty(eventId) && TextUtils.isEmpty(eventLabel) && (map == null || map.toHashMap().isEmpty())){
142-
TCAgent.onEvent(context, eventId);
143-
}
137+
TCAgent.onEvent(context, eventId, eventLabel, map == null ? null : ((ReadableNativeMap)map).toHashMap());
144138
}
145139

146140
/**

0 commit comments

Comments
 (0)