Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick "LibJS: Update console spec's use of "Type()" -> "is a"" #25225

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Userland/Libraries/LibJS/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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);
}
Expand Down Expand Up @@ -660,7 +660,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();
}
Expand All @@ -671,7 +671,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();
}
Expand Down
Loading