1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

Fix completion handler nil crashes SFSafariWindow

This commit is contained in:
Chad Scharf 2020-07-22 18:12:08 -04:00
parent f024441b6c
commit 8f032fd03d

View File

@ -175,7 +175,9 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
} else if command == "createNewTab" { } else if command == "createNewTab" {
if let data = m.data, let url = URL(string: data) { if let data = m.data, let url = URL(string: data) {
SFSafariApplication.getActiveWindow { win in 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" { } else if command == "reloadExtension" {