Skip to content

Commit 141be43

Browse files
committed
🐛 Fix a bug where the boolean value did not get sent correctly to the native SDK
1 parent 9d815d0 commit 141be43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ios/IBGPlugin.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ - (void) setViewHierarchyEnabled:(CDVInvokedUrlCommand*)command
498498
BOOL isEnabled = [command argumentAtIndex:0];
499499

500500
if (isEnabled) {
501-
[Instabug setViewHierarchyEnabled:isEnabled];
501+
[Instabug setViewHierarchyEnabled:[[command argumentAtIndex:0] boolValue]];
502502
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
503503
} else {
504504
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
@@ -521,7 +521,7 @@ - (void) setAutoScreenRecordingEnabled:(CDVInvokedUrlCommand*)command
521521
BOOL isEnabled = [command argumentAtIndex:0];
522522

523523
if (isEnabled) {
524-
[Instabug setAutoScreenRecordingEnabled:isEnabled];
524+
[Instabug setAutoScreenRecordingEnabled:[[command argumentAtIndex:0] boolValue]];
525525
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
526526
} else {
527527
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
@@ -695,7 +695,7 @@ - (void) setAutoShowingSurveysEnabled:(CDVInvokedUrlCommand*)command
695695
BOOL autoShowingSurveysEnabled = [command argumentAtIndex:0];
696696

697697
if (autoShowingSurveysEnabled) {
698-
[Instabug setAutoShowingSurveysEnabled:autoShowingSurveysEnabled];
698+
[Instabug setAutoShowingSurveysEnabled:[[command argumentAtIndex:0] boolValue]];
699699
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
700700
} else {
701701
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR

0 commit comments

Comments
 (0)