Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d7b3492

Browse files
committedAug 28, 2024·
add note about deleting next-patch symbol
1 parent 7e64957 commit d7b3492

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎tests/utils/fixture.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export const createFixture = async (fixture: string, ctx: FixtureTestContext) =>
8989
) {
9090
// @ts-ignore fetch doesn't have _nextOriginalFetch property in types
9191
globalThis.fetch = globalThis._nextOriginalFetch || globalThis.fetch._nextOriginalFetch
92+
// https://github.com/vercel/next.js/pull/68193/files#diff-4c54e369ddb9a2db1eed95fe1d678f94c8e82c540204475d42c78e49bf4f223aR37-R40
93+
// above changed the way Next.js checks wether fetch was already patched. It still sets `__nextPatched` and `_nextOriginalFetch`
94+
// properties we check above and use to get original fetch back
9295
delete globalThis[Symbol.for('next-patch')]
9396
}
9497

0 commit comments

Comments
 (0)
Please sign in to comment.