Skip to content

Commit

Permalink
fix: this reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 6, 2022
1 parent a08a468 commit 9c8e9e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/server/web/spec-extension/cookies.ts
Expand Up @@ -59,7 +59,7 @@ export class NextCookies extends Cookies {
super(response.headers.get('cookie'))
this.response = response
}
set(...args: Parameters<Cookies['set']>) {
set = (...args: Parameters<Cookies['set']>) => {
const isAlreadyAdded = super.has(args[0])
const store = super.set(...args)

Expand All @@ -84,7 +84,7 @@ export class NextCookies extends Cookies {

return store
}
delete(key: any, options: CookieSerializeOptions = {}) {
delete = (key: any, options: CookieSerializeOptions = {}) => {
const isDeleted = super.delete(key)

if (isDeleted) {
Expand All @@ -102,7 +102,7 @@ export class NextCookies extends Cookies {

return isDeleted
}
clear(options: CookieSerializeOptions = {}) {
clear = (options: CookieSerializeOptions = {}) => {
const expiredCookies = Array.from(super.keys())
.map((key) => serializeExpiredCookie(key, options))
.join(', ')
Expand Down

0 comments on commit 9c8e9e5

Please sign in to comment.