File tree 2 files changed +2
-1
lines changed 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { isPreview } from '../preview'
8
8
export default defineEventHandler ( async ( event ) => {
9
9
const query = getContentQuery ( event )
10
10
11
+ // Read from cache if not preview and there is no query
11
12
if ( ! isPreview ( event ) && Object . keys ( query ) . length === 0 ) {
12
13
const cache = cacheStorage . getItem ( 'content-navigation.json' )
13
14
if ( cache ) {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export async function getIndexedContentsList<T = ParsedContent> (event: Compatib
24
24
const params = query . params ( )
25
25
const path = params ?. where ?. find ( wh => wh . _path ) ?. _path
26
26
27
- // Index is available for string and RegExp paths
27
+ // Read from Index is not preview and path is string or RegExp
28
28
if ( ! isPreview ( event ) && ( typeof path === 'string' || path instanceof RegExp ) ) {
29
29
const index = await getContentIndex ( event )
30
30
const keys = Object . keys ( index )
You can’t perform that action at this time.
0 commit comments