mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
LibWeb: Remove redundant is_empty check from is_supported_property_index
An empty list of elements will not return true for any unsigned number, so we can simply remove this check.
This commit is contained in:
committed by
Andreas Kling
parent
cdd0038c9e
commit
b9b264e97a
@@ -151,9 +151,6 @@ bool HTMLCollection::is_supported_property_index(u32 index) const
|
||||
// The object’s supported property indices are the numbers in the range zero to one less than the number of elements represented by the collection.
|
||||
// If there are no such elements, then there are no supported property indices.
|
||||
auto elements = collect_matching_elements();
|
||||
if (elements.is_empty())
|
||||
return false;
|
||||
|
||||
return index < elements.size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user