mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibJS: Make PrimitiveString::deprecated_string() infallible
Work towards #20449.
This commit is contained in:
parent
c084269e5f
commit
09547ec975
17 changed files with 42 additions and 43 deletions
|
@ -246,7 +246,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> DateConstructor::construct(FunctionObjec
|
|||
if (primitive.is_string()) {
|
||||
// 1. Assert: The next step never returns an abrupt completion because Type(v) is String.
|
||||
// 2. Let tv be the result of parsing v as a date, in exactly the same manner as for the parse method (21.4.3.2).
|
||||
time_value = parse_date_string(TRY(primitive.as_string().deprecated_string()));
|
||||
time_value = parse_date_string(primitive.as_string().deprecated_string());
|
||||
}
|
||||
// iii. Else,
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue