From 3829a2172934df6ab7b9becd893c65ffdcf0d4fd Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 30 Jun 2021 10:22:16 +0100 Subject: [PATCH] fix(app): do not call handler twice on navigation (#280) --- packages/app/src/composables/asyncData.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/app/src/composables/asyncData.ts b/packages/app/src/composables/asyncData.ts index 3d6d2b3e74..550007c9b6 100644 --- a/packages/app/src/composables/asyncData.ts +++ b/packages/app/src/composables/asyncData.ts @@ -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