fix: Return None if headless

(cherry picked from commit bd319ec988)
This commit is contained in:
Andrew Collier
2026-09-05 14:26:37 -06:00
committed by Jake Writer
parent e41e4d6c80
commit e36e0fe3e1
+1 -1
View File
@@ -330,7 +330,7 @@ def get_screen_cons(headless: Optional[bool] = None) -> Optional[Screen]:
Bounds are CSS pixels, the unit Firefox lays its windows out in -- see
camoufox.display for why that differs from the monitor's physical size.
"""
if headless is False:
if headless is True:
return None # Skip if headless
display = largest_display()
if display is None: