-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
cookies().has()
breaks in app-route (#54112)
- Added `has` to ResponseCookies in [edge-runtime/cookies#533](vercel/edge-runtime#533) - Upgraded edge-runtime/cookies to 3.3.0 #54117 - Added a test case Fixes #54005 #54111
- Loading branch information
1 parent
bd5b715
commit 0431147
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/e2e/app-dir/app-routes/app/hooks/cookies/has/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NextResponse } from 'next/server' | ||
import { cookies } from 'next/headers' | ||
|
||
export async function GET() { | ||
const c = cookies() | ||
c.set('a', 'a') | ||
const hasCookie = c.has('a') | ||
|
||
return NextResponse.json({ hasCookie }) // expect { hasCookie: true } | ||
} |