[READ-ONLY] Mirror of https://github.com/danielroe/vue-sanity. Sanity integration for Vue Composition API
composition-api hacktoberfest javascript nuxt sanity typescript vue vuejs
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: allow query functions to return falsy values

enables dcfa82d323a4ef9a6cc58fe0433143c28291475d

+2 -2
+2 -2
src/query.ts
··· 25 25 'Default query options' 26 26 ) 27 27 28 - type Query = string | (() => string) 28 + type Query = string | (() => string | null | undefined | false) 29 29 30 30 interface Result<T> { 31 31 /** ··· 94 94 const computedQuery = 95 95 typeof query === 'string' 96 96 ? minifier(query).replace(/\n/g, ' ') 97 - : computed(() => minifier(query()).replace(/\n/g, ' ')) 97 + : computed(() => minifier(query() || '').replace(/\n/g, ' ')) 98 98 99 99 const { data, status, setCache, error, fetch } = useCache( 100 100 computedQuery,