diff --git a/packages/core/useFetch/index.ts b/packages/core/useFetch/index.ts index f6a2533eb83..c8160701ddd 100644 --- a/packages/core/useFetch/index.ts +++ b/packages/core/useFetch/index.ts @@ -211,7 +211,7 @@ export interface CreateFetchOptions { * to include the new options */ function isFetchOptions(obj: object): obj is UseFetchOptions { - return containsProp(obj, 'immediate', 'refetch', 'initialData', 'timeout', 'beforeFetch', 'afterFetch', 'onFetchError', 'fetch') + return obj && containsProp(obj, 'immediate', 'refetch', 'initialData', 'timeout', 'beforeFetch', 'afterFetch', 'onFetchError', 'fetch') } // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).