aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-25 15:49:35 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-25 15:49:35 -0700
commitb733125085a5746af121ce6d7b67eb45fb8e85e3 (patch)
treed92d564330a6787c5bba1eedbf90d3797c6cc8de
parent5ef36f1b6fa64d838f988d4b84110fae4c7015ac (diff)
downloadbun-b733125085a5746af121ce6d7b67eb45fb8e85e3.tar.gz
bun-b733125085a5746af121ce6d7b67eb45fb8e85e3.tar.zst
bun-b733125085a5746af121ce6d7b67eb45fb8e85e3.zip
Fix `console.log` not printing an empty line
Depends on https://github.com/oven-sh/WebKit/actions/runs/3123884691/jobs/5066828848 Fixes https://github.com/oven-sh/bun/issues/1276
m---------src/bun.js/WebKit0
-rw-r--r--src/bun.js/bindings/exports.zig7
2 files changed, 5 insertions, 2 deletions
diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit
-Subproject 2c5b61c7bf59e7e2ae35460ff240d294ee16c76
+Subproject 1ede1d2b6da3daa96dee9de11da1e093d721180
diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig
index b2d2acccb..b2fdd001e 100644
--- a/src/bun.js/bindings/exports.zig
+++ b/src/bun.js/bindings/exports.zig
@@ -944,7 +944,7 @@ pub const ZigConsoleClient = struct {
return;
}
- var console = JS.VirtualMachine.vm.console;
+ var console = global.bunVM().console;
if (message_type == .Clear) {
Output.resetTerminal();
@@ -985,7 +985,10 @@ pub const ZigConsoleClient = struct {
true,
true,
)
- else if (message_type != .Trace)
+ else if (message_type == .Log) {
+ _ = console.writer.write("\n") catch 0;
+ console.writer.flush() catch {};
+ } else if (message_type != .Trace)
writer.writeAll("undefined\n") catch unreachable;
if (message_type == .Trace) {