From f699cbdf77f21e756426522b350c749750be613d Mon Sep 17 00:00:00 2001 From: "@zheng.yufan" <3065702781@qq.com> Date: Sun, 25 Sep 2022 19:13:10 +0800 Subject: [PATCH] chore(nuxt): change isref to unref --- packages/nuxt/src/app/composables/fetch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index 4529f5f525a..9b2b0294d10 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -1,6 +1,6 @@ import type { FetchError, FetchOptions } from 'ohmyfetch' import type { TypedInternalResponse, NitroFetchRequest } from 'nitropack' -import { computed, isRef, Ref } from 'vue' +import { computed, unref, Ref } from 'vue' import type { AsyncDataOptions, _Transform, KeyOfRes, AsyncData, PickFrom } from './asyncData' import { useAsyncData } from './asyncData' @@ -52,7 +52,7 @@ export function useFetch< if (typeof r === 'function') { r = r() } - return (isRef(r) ? r.value : r) + return unref(r) }) const {