Skip to content

Commit 8f7856f

Browse files
Merge pull request #43 from mivbeard/master
Fixed issue when sent nil callbackId to commandDelegate
2 parents 23cdcc1 + 7f4b630 commit 8f7856f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ios/SafariViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ - (void) hide:(CDVInvokedUrlCommand*)command {
123123
*/
124124
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
125125
if (self.callbackId != nil) {
126-
NSString * cbid = self.callbackId;
126+
NSString * cbid = [self.callbackId copy];
127127
self.callbackId = nil;
128128
CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"event":@"closed"}];
129129
[self.commandDelegate sendPluginResult:pluginResult callbackId:cbid];

0 commit comments

Comments
 (0)