From 2cac2b742a40c81b9747b030e143695ed6cad2dd Mon Sep 17 00:00:00 2001 From: Alex Austin Date: Sun, 7 Aug 2016 16:05:17 -0700 Subject: [PATCH] Should clear deep link even if Branch --- src/android/io/branch/BranchSDK.java | 2 +- src/ios/BranchSDK.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/io/branch/BranchSDK.java b/src/android/io/branch/BranchSDK.java index 8043795e..0d2cfbac 100644 --- a/src/android/io/branch/BranchSDK.java +++ b/src/android/io/branch/BranchSDK.java @@ -693,11 +693,11 @@ public void onInitFinished(JSONObject referringParams, BranchError error) { message.put("error", "Not a Branch link!"); message.put("url", deepLinkUrl); - deepLinkUrl = null; out = String.format("NonBranchLinkHandler(%s)", message.toString()); webView.sendJavascript(out); } + deepLinkUrl = null; } catch (JSONException e) { e.printStackTrace(); } diff --git a/src/ios/BranchSDK.m b/src/ios/BranchSDK.m index 687a56bf..6dc761ce 100644 --- a/src/ios/BranchSDK.m +++ b/src/ios/BranchSDK.m @@ -134,9 +134,9 @@ - (void)initSession:(CDVInvokedUrlCommand*)command } else if (self.deepLinkUrl) { [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:@"BSDKPostUnhandledURL" object:self.deepLinkUrl]]; - self.deepLinkUrl = nil; } - + self.deepLinkUrl = nil; + if (command != nil) { [self.commandDelegate sendPluginResult: pluginResult callbackId: command.callbackId]; }