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(); }