Skip to content

Commit dab4576

Browse files
committed
Style tweaks
1 parent 8387923 commit dab4576

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/headers/src/lib/super-headers.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export class SuperHeaders extends Headers {
241241
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie)
242242
*/
243243
getSetCookie(): string[] {
244-
return this.#setCookies.map((value) => (typeof value === 'string' ? value : value.toString()));
244+
return this.#setCookies.map((v) => (typeof v === 'string' ? v : v.toString()));
245245
}
246246

247247
/**
@@ -251,11 +251,7 @@ export class SuperHeaders extends Headers {
251251
*/
252252
has(name: string): boolean {
253253
let key = name.toLowerCase();
254-
if (key === SetCookieKey) {
255-
return this.#setCookies.length > 0;
256-
} else {
257-
return this.#map.has(key);
258-
}
254+
return key === SetCookieKey ? this.#setCookies.length > 0 : this.#map.has(key);
259255
}
260256

261257
/**

0 commit comments

Comments
 (0)