aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/api/server.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index d99d7c9be..485b9c1eb 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -4142,11 +4142,11 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type {
if (exception.* != null) return js.JSValueMakeUndefined(ctx);
// only reload those two
- if (new_config.onRequest != .zero) {
+ if (this.config.onRequest != new_config.onRequest) {
this.config.onRequest.unprotect();
this.config.onRequest = new_config.onRequest;
}
- if (new_config.onError != .zero) {
+ if (this.config.onError != new_config.onError) {
this.config.onError.unprotect();
this.config.onError = new_config.onError;
}