From a7912af16c12695842a2eb6826f15b4e0ccda1bd Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Mon, 5 Dec 2022 14:06:45 +0100 Subject: [PATCH] fix: typo --- src/module.ts | 2 +- src/runtime/composables/navigation.ts | 3 ++- src/runtime/composables/query.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/module.ts b/src/module.ts index eaee60a31..79a2193f8 100644 --- a/src/module.ts +++ b/src/module.ts @@ -561,7 +561,7 @@ export default defineNuxtModule({ contentContext.defaultLocale = contentContext.defaultLocale || contentContext.locales[0] - // Generate cache integerity based on content context + // Generate cache integrity based on content context const cacheIntegrity = hash({ locales: options.locales, options: options.defaultLocale, diff --git a/src/runtime/composables/navigation.ts b/src/runtime/composables/navigation.ts index 9efc68cd0..735c3a16b 100644 --- a/src/runtime/composables/navigation.ts +++ b/src/runtime/composables/navigation.ts @@ -10,7 +10,8 @@ export const fetchContentNavigation = async (queryBuilder?: QueryBuilder | Query // When params is an instance of QueryBuilder then we need to pick the params explicitly const params: QueryBuilderParams = typeof queryBuilder?.params === 'function' ? queryBuilder.params() : queryBuilder - const apiPath = withContentBase(params ? `/navigation/${hash(params)}.${content.integerity}.json` : '/navigation') + const _apiPath = params ? `/navigation/${hash(params)}` : '/navigation/' + const apiPath = withContentBase(process.dev ? _apiPath : `${_apiPath}.${content.integrity}.json`) // Add `prefetch` to `` in production if (!process.dev && process.server) { diff --git a/src/runtime/composables/query.ts b/src/runtime/composables/query.ts index 76916194b..386f1a1fa 100644 --- a/src/runtime/composables/query.ts +++ b/src/runtime/composables/query.ts @@ -27,7 +27,7 @@ export const createQueryFetch = (path?: string) => async (que const params = query.params() - const apiPath = withContentBase(process.dev ? '/query' : `/query/${hash(params)}.${content.integerity}.json`) + const apiPath = withContentBase(process.dev ? '/query' : `/query/${hash(params)}.${content.integrity}.json`) // Prefetch the query if (!process.dev && process.server) {