mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
Fix crash in process.env.FOO = bar that happened sometimes
This commit is contained in:
@@ -1950,7 +1950,7 @@ pub const EventListenerMixin = struct {
|
||||
ctx: *CtxType,
|
||||
comptime onError: fn (ctx: *CtxType, err: anyerror, value: JSValue, request_ctx: *http.RequestContext) anyerror!void,
|
||||
) !void {
|
||||
if (comptime JSC.is_bindgen) unreachable;
|
||||
JSC.markBinding(@src());
|
||||
|
||||
var listeners = vm.event_listeners.get(EventType.fetch) orelse (return onError(ctx, error.NoListeners, JSValue.jsUndefined(), request_context) catch {});
|
||||
if (listeners.items.len == 0) return onError(ctx, error.NoListeners, JSValue.jsUndefined(), request_context) catch {};
|
||||
|
||||
Reference in New Issue
Block a user