Skip to content

Commit

Permalink
fix: fix brower support, take 2
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Oct 29, 2024
1 parent a5d4bf9 commit 7d84881
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ enum JSRuntime {
browser = 'browser',
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const isBun = !!(globalThis as any).Bun || !!globalThis.process.versions.bun;
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unnecessary-condition
const isBun = !!(globalThis as any).Bun || !!globalThis.process?.versions?.bun;
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const isDeno = !!(globalThis as any).Deno;
const isNode = globalThis.process.release.name === 'node';
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const isNode = globalThis.process?.release?.name === 'node';
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const isBrowser = !!(globalThis as any).navigator;

Expand Down

0 comments on commit 7d84881

Please sign in to comment.