Skip to content

Commit

Permalink
refactor: refine browser JS runtime detection
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Oct 30, 2024
1 parent 66310b4 commit 7537b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const isDeno = !!globalThis.Deno
const isNode = globalThis.process?.release?.name === 'node'
// const isHermes = !!globalThis.HermesInternal
// const isWorkerd = globalThis.navigator?.userAgent === 'Cloudflare-Workers'
const isBrowser = !!globalThis.navigator
const isBrowser = !!globalThis.window && !!globalThis.navigator

export const runtime = (() => {
if (isBun) return JSRuntime.bun
Expand Down

0 comments on commit 7537b2b

Please sign in to comment.