Merge pull request #1339 from bitwarden/fix/safari-app-crash-2

Fix completion handler nil crashes SFSafariWindow
This commit is contained in:
Chad Scharf 2020-07-22 18:34:57 -04:00 committed by GitHub
commit 25f2697dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
} else if command == "createNewTab" {
if let data = m.data, let url = URL(string: data) {
SFSafariApplication.getActiveWindow { win in
win?.openTab(with: url, makeActiveIfPossible: true, completionHandler: nil)
win?.openTab(with: url, makeActiveIfPossible: true, completionHandler: { _ in
// Tab opened
})
}
}
} else if command == "reloadExtension" {