From 6dd5d873daee191be678645dc4fb0c7c88f141d2 Mon Sep 17 00:00:00 2001 From: botmaster Date: Sat, 22 Jun 2024 17:29:47 +0200 Subject: [PATCH] fix: Fix ts issues --- components/content/prose/ProseH2.vue | 1 + components/content/prose/ProseH3.vue | 1 + composables/useOFetchWithCache.ts | 4 ++-- stores/article-database-info.store.ts | 2 +- stores/articles.store.ts | 2 +- types/types.ts | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/content/prose/ProseH2.vue b/components/content/prose/ProseH2.vue index 8dd752e..4671f76 100644 --- a/components/content/prose/ProseH2.vue +++ b/components/content/prose/ProseH2.vue @@ -14,6 +14,7 @@ const slots = useSlots(); const slotContent = computed(() => { if (slots.default) return slots.default()[0].children; + else return ''; }); diff --git a/components/content/prose/ProseH3.vue b/components/content/prose/ProseH3.vue index 459d43f..2a8a888 100644 --- a/components/content/prose/ProseH3.vue +++ b/components/content/prose/ProseH3.vue @@ -14,6 +14,7 @@ const slots = useSlots(); const slotContent = computed(() => { if (slots.default) return slots.default()[0].children; + else return ''; }); diff --git a/composables/useOFetchWithCache.ts b/composables/useOFetchWithCache.ts index f26cce5..afe9f1a 100644 --- a/composables/useOFetchWithCache.ts +++ b/composables/useOFetchWithCache.ts @@ -8,7 +8,7 @@ export default async (url: string, options: Record): Promise if (!cached.value) { try { - console.log(`Fetching value from ${url}`); + // console.log(`Fetching value from ${url}`); const data = await $fetch(url, { ...options }); cached.value = data as T; } @@ -18,7 +18,7 @@ export default async (url: string, options: Record): Promise } } else { - console.log(`Getting value from cache for ${url}`); + // console.log(`Getting value from cache for ${url}`); } return cached.value; diff --git a/stores/article-database-info.store.ts b/stores/article-database-info.store.ts index 37279e2..9e0ef86 100644 --- a/stores/article-database-info.store.ts +++ b/stores/article-database-info.store.ts @@ -15,7 +15,7 @@ export const useArticleDatabaseInfoStore = defineStore('articleDatabaseInfo', () // Actions const fetchDatabase = async () => { - console.log('Fetching database info'); + // console.log('Fetching database info'); loading.value = true; try { diff --git a/stores/articles.store.ts b/stores/articles.store.ts index 7799a85..f71b651 100644 --- a/stores/articles.store.ts +++ b/stores/articles.store.ts @@ -17,7 +17,7 @@ export const useArticlesStore = defineStore('articles', () => { // Actions const fetchArticles = async (body: any) => { - console.log('Fetching articles'); + // console.log('Fetching articles'); loading.value = true; try { diff --git a/types/types.ts b/types/types.ts index 25d1be3..6f092f5 100644 --- a/types/types.ts +++ b/types/types.ts @@ -1,4 +1,4 @@ -import type { MarkdownParsedContent } from '@nuxt/content/dist/runtime/types'; +import type { MarkdownParsedContent } from '@nuxt/content/'; export interface ITheme { name: string