Fix check in get_array_index_from_id to return early on ASCII char (#36136)

* fix: wrong ascii check in get_array_index_from_id

Signed-off-by: Michael Rees <mrees@noeontheend.com>

* Update WPT expectations

Signed-off-by: Michael Rees <mrees@noeontheend.com>

---------

Signed-off-by: Michael Rees <mrees@noeontheend.com>
This commit is contained in:
Michael Rees 2025-03-25 14:27:38 -05:00 committed by GitHub
parent 80fc64d063
commit 09041e77a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1 additions and 13 deletions

View file

@ -196,7 +196,7 @@ pub(crate) unsafe fn get_array_index_from_id(_cx: *mut JSContext, id: HandleId)
let first_char = char::decode_utf16(chars.iter().cloned())
.next()
.map_or('\0', |r| r.unwrap_or('\0'));
if !first_char.is_ascii_lowercase() {
if first_char.is_ascii_lowercase() {
return None;
}