From b9a705f84b9f07e365ba1e5cc6afc8b0bb3a7906 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 6 Jun 2023 23:51:05 -0700 Subject: add buffer label (#3220) Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/bindings/exports.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig index 0481d6215..dc56a07af 100644 --- a/src/bun.js/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -2746,7 +2746,13 @@ pub const ZigConsoleClient = struct { const arrayBuffer = value.asArrayBuffer(this.globalThis).?; const slice = arrayBuffer.byteSlice(); - writer.writeAll(bun.asByteSlice(@tagName(arrayBuffer.typed_array_type))); + writer.writeAll( + if (arrayBuffer.typed_array_type == .Uint8Array and + arrayBuffer.value.isBuffer(this.globalThis)) + "Buffer" + else + bun.asByteSlice(@tagName(arrayBuffer.typed_array_type)), + ); writer.print("({d}) [ ", .{arrayBuffer.len}); if (slice.len > 0) { -- cgit v1.2.3