Skip to content

Commit

Permalink
perf: use import.meta.server over process.server
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Mar 18, 2024
1 parent 8c471c7 commit d62cc83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default defineNuxtModule<ModuleOptions>({
name: 'nuxt-api-party',
configKey: 'apiParty',
compatibility: {
nuxt: '^3',
nuxt: '^3.7',
},
},
defaults: {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/$api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function _$api<T = any>(

const request = (client ? clientFetcher() : serverFetcher())
.then((response) => {
if (process.server || cache)
if (import.meta.server || cache)
nuxt.payload.data[_key] = response
promiseMap.delete(_key)
return response
Expand Down

0 comments on commit d62cc83

Please sign in to comment.