From b42069231ce07f509fa261840180292e0f2b49be Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 8 Apr 2023 22:50:56 -0400 Subject: [PATCH] *Add support for destroy --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6cd7912..5e9264d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -556,8 +556,9 @@ async function createProtomuxMessage(aq: ActiveQuery) { }; aq.setReceiveUpdate?.((data) => { - if (data.action === "send") { - message.send(...data.args); + if (["send", "destroy"].includes(data.action)) { + message[data.action](...data.args); + return; } defers[data.action]?.resolve(data.args);