mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibJS: Convert to_u8() to ThrowCompletionOr
This commit is contained in:
parent
1b7dbb6b3b
commit
99287afc99
3 changed files with 4 additions and 4 deletions
|
@ -180,7 +180,7 @@ static ByteBuffer numeric_to_raw_bytes(GlobalObject& global_object, Value value,
|
|||
else if constexpr (sizeof(UnderlyingBufferDataType) == 2)
|
||||
int_value = MUST(value.to_u16(global_object));
|
||||
else if constexpr (!IsSame<T, ClampedU8>)
|
||||
int_value = value.to_u8(global_object);
|
||||
int_value = MUST(value.to_u8(global_object));
|
||||
else
|
||||
int_value = value.to_u8_clamp(global_object);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue