mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix event proxy not being able to remove handlers
This commit is contained in:
parent
eaea40bfee
commit
ca1574fccc
1 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,8 @@ export default function (client: ScramjetClient, self: Self) {
|
||||||
set(ctx, value: any) {
|
set(ctx, value: any) {
|
||||||
this[realOnEvent] = value;
|
this[realOnEvent] = value;
|
||||||
|
|
||||||
|
if (typeof value !== "function") return ctx.set(value);
|
||||||
|
|
||||||
ctx.set(wraplistener(value));
|
ctx.set(wraplistener(value));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue