Skip to content

Commit

Permalink
Fix brave/brave-ios#8013: Fix Playlist Crash on iPad due to invalid S…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T authored Sep 27, 2023
1 parent 685d0e6 commit 6d384a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ extension PlaylistListViewController {
}
}

let items = try await PlaylistSharedFolderNetwork.fetchMediaItemInfo(item: model, viewForInvisibleWebView: self.view)
let items = try await PlaylistSharedFolderNetwork.fetchMediaItemInfo(item: model, viewForInvisibleWebView: self.playerView.window ?? self.playerView.superview ?? self.playerView)
try Task.checkCancellation()

try folder.playlistItems?.forEach({ playlistItem in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class PlaylistWebLoader: UIView {

guard let webView = tab.webView,
let browserViewController = self.currentScene?.browserViewController else {
continuation.resume(returning: nil)
self.handler?(nil)
return
}

Expand Down

0 comments on commit 6d384a8

Please sign in to comment.