diff options
author | 2023-06-06 23:51:05 -0700 | |
---|---|---|
committer | 2023-06-06 23:51:05 -0700 | |
commit | b9a705f84b9f07e365ba1e5cc6afc8b0bb3a7906 (patch) | |
tree | 1a7384b0a0d176a3dabff6dcf77f681872a55c30 | |
parent | d265ed80d20267bc5252c31022af36d139bc283e (diff) | |
download | bun-b9a705f84b9f07e365ba1e5cc6afc8b0bb3a7906.tar.gz bun-b9a705f84b9f07e365ba1e5cc6afc8b0bb3a7906.tar.zst bun-b9a705f84b9f07e365ba1e5cc6afc8b0bb3a7906.zip |
add buffer label (#3220)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
-rw-r--r-- | src/bun.js/bindings/exports.zig | 8 |
1 files changed, 7 insertions, 1 deletions
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) { |