Skip to content

Commit

Permalink
fix: eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
comanche2 committed Feb 19, 2024
1 parent ed301b6 commit ae20692
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime/server/content-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { H3Event } from 'h3'
import type { ParsedContent } from '../types'
import type { ContentQueryBuilder } from '../types/query'
import { isPreview } from './preview'
import {cacheStorage, chunksFromArray, getContent, getContentsList} from './storage'
import { cacheStorage, chunksFromArray, getContent, getContentsList } from './storage'
import { useRuntimeConfig } from '#imports'

export async function getContentIndex (event: H3Event) {
Expand Down Expand Up @@ -39,12 +39,12 @@ export async function getIndexedContentsList<T = ParsedContent> (event: H3Event,
.filter(key => (path as any).test ? (path as any).test(key) : key === String(path))
.flatMap(key => index[key])

const keyChunks = [...chunksFromArray(keys, 10)];
const keyChunks = [...chunksFromArray(keys, 10)]

const contents = [];
const contents = []
for (const chunk of keyChunks) {
const result = await Promise.all(chunk.map((key) => getContent(event, key)));
contents.push(...result);
const result = await Promise.all(chunk.map(key => getContent(event, key)))
contents.push(...result)
}

return contents as unknown as Promise<T[]>
Expand Down

0 comments on commit ae20692

Please sign in to comment.