Skip to content

Commit a7912af

Browse files
committed
fix: typo
1 parent 4ab5e05 commit a7912af

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export default defineNuxtModule<ModuleOptions>({
561561

562562
contentContext.defaultLocale = contentContext.defaultLocale || contentContext.locales[0]
563563

564-
// Generate cache integerity based on content context
564+
// Generate cache integrity based on content context
565565
const cacheIntegrity = hash({
566566
locales: options.locales,
567567
options: options.defaultLocale,

src/runtime/composables/navigation.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const fetchContentNavigation = async (queryBuilder?: QueryBuilder | Query
1010
// When params is an instance of QueryBuilder then we need to pick the params explicitly
1111
const params: QueryBuilderParams = typeof queryBuilder?.params === 'function' ? queryBuilder.params() : queryBuilder
1212

13-
const apiPath = withContentBase(params ? `/navigation/${hash(params)}.${content.integerity}.json` : '/navigation')
13+
const _apiPath = params ? `/navigation/${hash(params)}` : '/navigation/'
14+
const apiPath = withContentBase(process.dev ? _apiPath : `${_apiPath}.${content.integrity}.json`)
1415

1516
// Add `prefetch` to `<head>` in production
1617
if (!process.dev && process.server) {

src/runtime/composables/query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const createQueryFetch = <T = ParsedContent>(path?: string) => async (que
2727

2828
const params = query.params()
2929

30-
const apiPath = withContentBase(process.dev ? '/query' : `/query/${hash(params)}.${content.integerity}.json`)
30+
const apiPath = withContentBase(process.dev ? '/query' : `/query/${hash(params)}.${content.integrity}.json`)
3131

3232
// Prefetch the query
3333
if (!process.dev && process.server) {

0 commit comments

Comments
 (0)