Skip to content

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Oct 7, 2025

Fixed ElementQuery#last() to throw NoSuchElementException instead of IndexOutOfBoundsException when no elements are found. The method now checks if the list is empty before accessing elements.

Fixes #1561

Fixed ElementQuery#last() to throw NoSuchElementException instead of
IndexOutOfBoundsException when no elements are found. The method now
checks if the list is empty before accessing elements.

Fixes #1561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ElementQuery#last hrows IndexOutOfBoundsException instead of NoSuchElementException
1 participant