diff options
Diffstat (limited to 'src/bun.js/api/server.zig')
-rw-r--r-- | src/bun.js/api/server.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 23c961480..d93ca7ac6 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -2139,12 +2139,12 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type { // only reload those two if (new_config.onRequest != .zero) { - this.config.onRequest = new_config.onRequest; this.config.onRequest.unprotect(); + this.config.onRequest = new_config.onRequest; } if (new_config.onError != .zero) { - this.config.onError = new_config.onError; this.config.onError.unprotect(); + this.config.onError = new_config.onError; } return this.thisObject.asObjectRef(); |