From a7a16d28d1110b34a90429e15bb859a0e3bfa6ec Mon Sep 17 00:00:00 2001 From: Aryan Jassal Date: Tue, 3 Dec 2024 12:01:48 +1100 Subject: [PATCH] fix: input can be a AsyncIterableIterator --- src/client/handlers/VaultsSecretsRemove.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/handlers/VaultsSecretsRemove.ts b/src/client/handlers/VaultsSecretsRemove.ts index c77dce961..a3a2150df 100644 --- a/src/client/handlers/VaultsSecretsRemove.ts +++ b/src/client/handlers/VaultsSecretsRemove.ts @@ -26,7 +26,7 @@ class VaultsSecretsRemove extends DuplexHandler< ClientRPCResponseResult > { public handle = async function* ( - input: AsyncIterable< + input: AsyncIterableIterator< ClientRPCRequestParams< SecretsRemoveHeaderMessage | SecretIdentifierMessageTagged > @@ -36,9 +36,8 @@ class VaultsSecretsRemove extends DuplexHandler< this.container; // Extracts the header message from the iterator const headerMessage = await (async () => { - const iterator = input[Symbol.asyncIterator](); const header: SecretsRemoveHeaderMessage | SecretIdentifierMessageTagged = - (await iterator.next()).value; + (await input.next()).value; if (header == null || header.type !== 'VaultNamesHeaderMessage') { throw new clientErrors.ErrorClientInvalidHeader(); }