Skip to content

Commit f4fc9d5

Browse files
committed
Make sure that set debug enabled is for the android platform to avoid crashes in iOS
1 parent b8ec3be commit f4fc9d5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,6 @@ public void run() {
11081108
}
11091109

11101110
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
1111-
String keyInLowerCase = key.toLowerCase();
11121111
switch (key) {
11131112
case SHAKE_HINT:
11141113
return InstabugCustomTextPlaceHolder.Key.SHAKE_HINT;

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,9 @@ module.exports = {
728728
* @param isDebugEnabled whether debug logs should be printed or not into LogCat
729729
*/
730730
setDebugEnabled: function(isDebugEnabled) {
731-
Instabug.setDebugEnabled(isDebugEnabled);
731+
if (Platform.OS === 'android') {
732+
Instabug.setDebugEnabled(isDebugEnabled);
733+
}
732734
},
733735

734736
/**

0 commit comments

Comments
 (0)