Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
fix: typo
  • Loading branch information
danielroe committed Mar 31, 2022
commit 4ba6257288e1d68eb9fac72700fa28f0ff675d4e
6 changes: 3 additions & 3 deletions packages/nuxt3/src/app/composables/asyncData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface RefreshOptions {
export interface _AsyncData<DataT> {
data: Ref<DataT>
pending: Ref<boolean>
refrash: (opts?: RefreshOptions) => Promise<void>
refresh: (opts?: RefreshOptions) => Promise<void>
error?: any
}

Expand Down Expand Up @@ -87,7 +87,7 @@ export function useAsyncData<
error: ref(nuxt.payload._errors[key] ?? null)
} as AsyncData<DataT>

asyncData.refrash = (opts = {}) => {
asyncData.refresh = (opts = {}) => {
// Avoid fetching same key more than once at a time
if (nuxt._asyncDataPromises[key]) {
return nuxt._asyncDataPromises[key]
Expand Down Expand Up @@ -125,7 +125,7 @@ export function useAsyncData<
return nuxt._asyncDataPromises[key]
}

const initialFetch = () => asyncData.refrash({ _initial: true })
const initialFetch = () => asyncData.refresh({ _initial: true })

const fetchOnServer = options.server !== false && nuxt.payload.serverRendered

Expand Down