mirror of
https://github.com/honojs/hono.git
synced 2024-11-21 18:18:57 +01:00
This reverts commit a285c4b3b4
.
This commit is contained in:
parent
bb14b1e5ba
commit
4d33e1c0d4
@ -47,12 +47,8 @@ export const getRuntimeKey = (): Runtime => {
|
||||
const global = globalThis as any
|
||||
|
||||
// check if the current runtime supports navigator.userAgent
|
||||
let userAgentSupported = false
|
||||
// In Cloudflare Pages, navigator is undefined in the production environment.
|
||||
// Therefore, it only check navigator.userAgent.
|
||||
try {
|
||||
userAgentSupported = typeof navigator.userAgent === 'string'
|
||||
} catch {}
|
||||
const userAgentSupported =
|
||||
typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string'
|
||||
|
||||
// if supported, check the user agent
|
||||
if (userAgentSupported) {
|
||||
|
Loading…
Reference in New Issue
Block a user