Skip to content

Commit

Permalink
Style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Dec 21, 2024
1 parent 8387923 commit dab4576
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/headers/src/lib/super-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class SuperHeaders extends Headers {
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie)
*/
getSetCookie(): string[] {
return this.#setCookies.map((value) => (typeof value === 'string' ? value : value.toString()));
return this.#setCookies.map((v) => (typeof v === 'string' ? v : v.toString()));
}

/**
Expand All @@ -251,11 +251,7 @@ export class SuperHeaders extends Headers {
*/
has(name: string): boolean {
let key = name.toLowerCase();
if (key === SetCookieKey) {
return this.#setCookies.length > 0;
} else {
return this.#map.has(key);
}
return key === SetCookieKey ? this.#setCookies.length > 0 : this.#map.has(key);
}

/**
Expand Down

0 comments on commit dab4576

Please sign in to comment.