diff --git a/src/context.ts b/src/context.ts index a23942e0..af47d958 100644 --- a/src/context.ts +++ b/src/context.ts @@ -266,8 +266,7 @@ export const TEXT_PLAIN = 'text/plain; charset=UTF-8' * @returns The updated Headers object. */ const setHeaders = (headers: Headers, map: Record = {}) => { - for (let i = 0, keys = Object.keys(map), len = keys.length; i < len; i++) { - const key = keys[i] + for (const key of Object.keys(map)) { headers.set(key, map[key]) } return headers