mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-06 00:48:08 +02:00
Fix completion handler nil crashes SFSafariWindow
This commit is contained in:
parent
f024441b6c
commit
8f032fd03d
@ -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" {
|
||||||
|
Loading…
Reference in New Issue
Block a user