Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
small fix for node fetch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed Dec 22, 2023
1 parent 89862c6 commit cb8b2fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: set node version
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

# Install Build stuff
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let isNode = false;
if (typeof globalThis.fetch === 'undefined') {
if (typeof window === 'undefined' || typeof globalThis.fetch !== 'undefined') {
globalThis.fetch = (await import('node-fetch')).default;
isNode = true;
}
Expand Down

0 comments on commit cb8b2fe

Please sign in to comment.