Skip to content

Commit

Permalink
fix: opt in to import.meta.* properties
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 25, 2024
1 parent 0f0abb0 commit 99e98c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/httpFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ export function createHttpClient(): $Fetch {
options.body.append('_method', 'PUT');
}

if (process.server) {
if (import.meta.server) {
options.headers = buildServerHeaders(options.headers);
}

if (process.client) {
if (import.meta.client) {
if (!SECURE_METHODS.has(method)) {
return;
}
Expand All @@ -98,7 +98,7 @@ export function createHttpClient(): $Fetch {

async onResponse({ response }): Promise<void> {
// pass all cookies from the API to the client on SSR response
if (process.server) {
if (import.meta.server) {
const serverCookieName = 'set-cookie';
const cookie = response.headers.get(serverCookieName);

Expand Down

0 comments on commit 99e98c9

Please sign in to comment.