mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
feat(console.log): Print annonymus when class name is unknown (#5595)
This matches the functionality in Node.
This commit is contained in:
@@ -2158,7 +2158,7 @@ pub const ZigConsoleClient = struct {
|
||||
this.addForNewLine(printable.len);
|
||||
|
||||
if (printable.len == 0) {
|
||||
writer.print(comptime Output.prettyFmt("<cyan>[class]<r>", enable_ansi_colors), .{});
|
||||
writer.print(comptime Output.prettyFmt("<cyan>[class (anonymous)]<r>", enable_ansi_colors), .{});
|
||||
} else {
|
||||
writer.print(comptime Output.prettyFmt("<cyan>[class {}]<r>", enable_ansi_colors), .{printable});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ Promise { <pending> }
|
||||
[Function]
|
||||
[Function]
|
||||
[class Foo]
|
||||
[class]
|
||||
[class (anonymous)]
|
||||
{}
|
||||
[Function: foooo]
|
||||
/FooRegex/
|
||||
|
||||
Reference in New Issue
Block a user