Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Removes redundant return statement after retry

Daniel T.f6b45837e98e
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.py
index f4ffcbcee..98276a05c 100644
--- a/browser_use/controller/service.py
+++ b/browser_use/controller/service.py
@@ -508,8 +508,6 @@ Explain the content of the page and that the requested information is not availa
dy_result = await retry_async_function(
lambda: page.evaluate('() => window.innerHeight'), 'Scroll failed due to an error.'
)
- if action_result:
- return action_result
window_height = dy_result or 0
# Determine scroll amount based on num_pages