From ca1574fccc634f4dc3766f2bb666f95084be6a09 Mon Sep 17 00:00:00 2001 From: velzie Date: Mon, 29 Jul 2024 14:04:31 -0400 Subject: [PATCH] fix event proxy not being able to remove handlers --- src/client/shared/event.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/shared/event.ts b/src/client/shared/event.ts index 7ac0b58..a404f57 100644 --- a/src/client/shared/event.ts +++ b/src/client/shared/event.ts @@ -72,6 +72,8 @@ export default function (client: ScramjetClient, self: Self) { set(ctx, value: any) { this[realOnEvent] = value; + if (typeof value !== "function") return ctx.set(value); + ctx.set(wraplistener(value)); }, });