Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix consumption from Next.js client components #464

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-pandas-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hibp': patch
---

Fix consumption from Next.js client components.
3 changes: 2 additions & 1 deletion src/api/fetch-polyfill.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable global-require */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unnecessary-condition */

// This can probably be removed in favor of Node's native fetch once we drop
// support for v18. https://x.com/ebey_jacob/status/1709975146939973909?s=20
Expand All @@ -9,7 +10,7 @@
export function installUndiciOnNode18() {
if (
typeof process !== 'undefined' &&
process.versions.node.startsWith('18.')
process.versions?.node?.startsWith('18.')
) {
const {
File: UndiciFile,
Expand Down
Loading