Skip to content

Commit

Permalink
chore: assert request event exists within server context (#2742)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 30, 2024
1 parent c85a3a1 commit 59f6a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export function getDomainFromLocale(localeCode: Locale): string | undefined {
if (process.server) {
const {
node: { req }
} = useRequestEvent(nuxtApp)
} = useRequestEvent(nuxtApp)!
protocol = req && isHTTPS(req) ? 'https:' : 'http:'
} else {
protocol = new URL(window.location.origin).protocol
Expand Down

0 comments on commit 59f6a72

Please sign in to comment.