From 224ec367f3915dc24cdf3493e0030b8b0231ed72 Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Fri, 1 Nov 2024 18:02:08 +0900 Subject: [PATCH] refactor(context): use simple for-of syntax (#3598) --- src/context.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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