mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibJS: Remove as_size_t()
Just like to_size_t() - which was already removed in f369229
- this is
non-standard, use to_length() instead. One remaining use was removed,
and I'm glad it's gone. :^)
This commit is contained in:
parent
a1014d25de
commit
40eab55e7d
3 changed files with 3 additions and 8 deletions
|
@ -449,7 +449,9 @@ JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
|
|||
return JS::Value(&sheet.global_object());
|
||||
}
|
||||
} else {
|
||||
auto index = name_value.as_size_t();
|
||||
auto index = name_value.to_length(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
if (index < workbook.sheets().size())
|
||||
return JS::Value(&workbook.sheets()[index].global_object());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue