mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Convert to_number() to ThrowCompletionOr
This commit is contained in:
parent
a36ee213b9
commit
20d990563c
Notes:
sideshowbarker
2024-07-18 02:12:47 +09:00
Author: https://github.com/IdanHo
Commit: 20d990563c
Pull-request: https://github.com/SerenityOS/serenity/pull/10522
Reviewed-by: https://github.com/linusg ✅
22 changed files with 149 additions and 343 deletions
|
@ -352,9 +352,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_arithmetic)
|
|||
|
||||
auto& column_name_str = column_name.as_string().string();
|
||||
|
||||
auto offset = vm.argument(1).to_number(global_object);
|
||||
if (!offset.is_number())
|
||||
return {};
|
||||
auto offset = TRY_OR_DISCARD(vm.argument(1).to_number(global_object));
|
||||
|
||||
auto offset_number = offset.as_i32();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue