mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
LibJS: Update console spec's use of "Type()" -> "is a"
Corresponds to the change in this PR: https://github.com/whatwg/console/pull/241
This commit is contained in:
parent
3467076dbc
commit
99c66f49fb
Notes:
github-actions[bot]
2024-10-31 12:17:17 +00:00
Author: https://github.com/AtkinsSJ
Commit: 99c66f49fb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2076
Reviewed-by: https://github.com/gmta ✅
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ ThrowCompletionOr<Value> Console::assert_()
|
|||
else {
|
||||
// 1. Let first be data[0].
|
||||
auto& first = data[0];
|
||||
// 2. If Type(first) is not String, then prepend message to data.
|
||||
// 2. If first is not a String, then prepend message to data.
|
||||
if (!first.is_string()) {
|
||||
data.prepend(message);
|
||||
}
|
||||
|
@ -858,7 +858,7 @@ ThrowCompletionOr<MarkedVector<Value>> ConsoleClient::formatter(MarkedVector<Val
|
|||
}
|
||||
// 2. If specifier is %d or %i:
|
||||
else if (specifier.is_one_of("%d"sv, "%i"sv)) {
|
||||
// 1. If Type(current) is Symbol, let converted be NaN
|
||||
// 1. If current is a Symbol, let converted be NaN
|
||||
if (current.is_symbol()) {
|
||||
converted = js_nan();
|
||||
}
|
||||
|
@ -869,7 +869,7 @@ ThrowCompletionOr<MarkedVector<Value>> ConsoleClient::formatter(MarkedVector<Val
|
|||
}
|
||||
// 3. If specifier is %f:
|
||||
else if (specifier == "%f"sv) {
|
||||
// 1. If Type(current) is Symbol, let converted be NaN
|
||||
// 1. If current is a Symbol, let converted be NaN
|
||||
if (current.is_symbol()) {
|
||||
converted = js_nan();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue