aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/api/bun/socket.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/bun/socket.zig b/src/bun.js/api/bun/socket.zig
index 7a3176072..925db901d 100644
--- a/src/bun.js/api/bun/socket.zig
+++ b/src/bun.js/api/bun/socket.zig
@@ -251,7 +251,7 @@ pub const SocketConfig = struct {
}
}
- if (opts.getTruthy(globalObject, "hostname")) |hostname| {
+ if (opts.getTruthy(globalObject, "hostname") orelse opts.getTruthy(globalObject, "host")) |hostname| {
if (!hostname.isString()) {
exception.* = JSC.toInvalidArguments("Expected \"hostname\" to be a string", .{}, globalObject).asObjectRef();
return null;
@@ -287,7 +287,7 @@ pub const SocketConfig = struct {
}
if (hostname_or_unix.len == 0) {
- exception.* = JSC.toInvalidArguments("Expected \"unix\" to be a non-empty string", .{}, globalObject).asObjectRef();
+ exception.* = JSC.toInvalidArguments("Expected \"unix\" or \"hostname\" to be a non-empty string", .{}, globalObject).asObjectRef();
return null;
}