mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(app): do not call handler twice on navigation (#280)
This commit is contained in:
parent
86af8457a9
commit
3829a21729
@ -1,4 +1,4 @@
|
||||
import { getCurrentInstance, onBeforeMount, onUnmounted, Ref, ref, unref, UnwrapRef, watch } from 'vue'
|
||||
import { getCurrentInstance, onBeforeMount, onUnmounted, Ref, ref, unref, UnwrapRef } from 'vue'
|
||||
import { Nuxt, useNuxt } from '@nuxt/app'
|
||||
|
||||
import { NuxtComponentPendingPromises } from './component'
|
||||
@ -85,9 +85,6 @@ export function useAsyncData (defaults?: AsyncDataOptions) {
|
||||
|
||||
// Client side
|
||||
if (process.client) {
|
||||
// Watch handler
|
||||
watch(handler.bind(null, nuxt), fetch)
|
||||
|
||||
// 1. Hydration (server: true): no fetch
|
||||
if (nuxt.isHydrating && fetchOnServer) {
|
||||
state.pending.value = false
|
||||
|
Loading…
Reference in New Issue
Block a user