mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb: Reverse check for whether a FilesList index is supported
This fixes for..of iteration of a FilesList object.
This commit is contained in:
parent
c2ef506b4a
commit
0cc8698a62
3 changed files with 18 additions and 7 deletions
|
@ -41,7 +41,7 @@ bool FileList::is_supported_property_index(u32 index) const
|
|||
if (m_files.is_empty())
|
||||
return false;
|
||||
|
||||
return m_files.size() < index;
|
||||
return index < m_files.size();
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::Value> FileList::item_value(size_t index) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue