Make sure that set debug enabled is for the android platform to avoid crashes in iOS

This commit is contained in:
Salma ElTarzi 2017-07-18 18:03:24 +02:00
parent b8ec3be49a
commit f4fc9d53e1
2 changed files with 3 additions and 2 deletions

View File

@ -1108,7 +1108,6 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
}
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
String keyInLowerCase = key.toLowerCase();
switch (key) {
case SHAKE_HINT:
return InstabugCustomTextPlaceHolder.Key.SHAKE_HINT;

View File

@ -728,7 +728,9 @@ module.exports = {
* @param isDebugEnabled whether debug logs should be printed or not into LogCat
*/
setDebugEnabled: function(isDebugEnabled) {
Instabug.setDebugEnabled(isDebugEnabled);
if (Platform.OS === 'android') {
Instabug.setDebugEnabled(isDebugEnabled);
}
},
/**