fix local variable not defined errors (#4376)

This commit is contained in:
Shuchang Zheng
2026-01-01 12:20:09 -08:00
committed by GitHub
parent 12539d27a2
commit b333e4c829
2 changed files with 3 additions and 0 deletions

View File

@@ -886,6 +886,8 @@ class SkyvernElement:
target_y: int | None = None
rect = await self.get_rect(timeout=timeout)
element_x: int | None = None
element_y: int | None = None
if rect is not None:
element_x = rect["x"] if rect["x"] > 0 else None
element_y = rect["y"] if rect["y"] > 0 else None