Skip to content

Commit

Permalink
Validate Webview URL before reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Jan 15, 2025
1 parent 74c0183 commit d684850
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,13 @@ extension DuckPlayerNavigationHandler: DuckPlayerNavigationHandling {

// Reset DuckPlayer status
duckPlayer.settings.allowFirstVideo = false

guard isDuckPlayerFeatureEnabled else {
webView.reload()

guard let url = webView.url else {
return
}

guard let url = webView.url else {
guard isDuckPlayerFeatureEnabled else {
webView.reload()
return
}

Expand Down

0 comments on commit d684850

Please sign in to comment.