Skip to content

Commit

Permalink
refactor(context): use simple for-of syntax (#3598)
Browse files Browse the repository at this point in the history
  • Loading branch information
usualoma authored Nov 1, 2024
1 parent ae99d86 commit 224ec36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ export const TEXT_PLAIN = 'text/plain; charset=UTF-8'
* @returns The updated Headers object.
*/
const setHeaders = (headers: Headers, map: Record<string, string> = {}) => {
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
Expand Down

0 comments on commit 224ec36

Please sign in to comment.