Skip to content

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

fix redundant gif none screenshot check

Nick Sweeting836ddcc71b51
diff --git a/browser_use/agent/gif.py b/browser_use/agent/gif.py
index a8208cb33..7e3730de2 100644
--- a/browser_use/agent/gif.py
+++ b/browser_use/agent/gif.py
@@ -56,9 +56,9 @@ def create_history_gif(
images = []
- # if history is empty or first screenshot is None, we can't create a gif
- if not history.history or not history.history[0].state.screenshot:
- logger.warning('No history or first screenshot to create GIF from')
+ # if history is empty, we can't create a gif
+ if not history.history:
+ logger.warning('No history to create GIF from')
return
# Find the first non-placeholder screenshot