Skip to content

Commit fa6efdd

Browse files
committed
lint: fix
1 parent 4c61f2b commit fa6efdd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default defineNuxtModule<ModuleOptions>({
176176
nuxt.options.routeRules![`/__nuxt_content/**`] = {
177177
...nuxt.options.routeRules![`/__nuxt_content/**`],
178178
// @ts-expect-error - Prevent nuxtseo from indexing nuxt-content routes
179-
robots: false
179+
robots: false,
180180
}
181181

182182
manifest.collections.forEach((collection) => {

src/runtime/presets/cloudflare/database-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { eventHandler, getRouterParam, setHeader } from 'h3'
22
import { useStorage } from 'nitropack/runtime'
33

44
export default eventHandler(async (event) => {
5-
const collection = getRouterParam(event, 'collection')!
5+
const collection = getRouterParam(event, 'collection')! || event.path?.split('/')?.[2] || ''
66
setHeader(event, 'Content-Type', 'text/plain')
77

88
const ASSETS = event?.context?.cloudflare?.env.ASSETS || process.env.ASSETS

src/runtime/presets/node/database-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { eventHandler, getRouterParam, setHeader } from 'h3'
22
import { useStorage } from 'nitropack/runtime'
33

44
export default eventHandler(async (event) => {
5-
const collection = getRouterParam(event, 'collection')! || event.path?.split('/')[2]!
5+
const collection = getRouterParam(event, 'collection')! || event.path?.split('/')?.[2] || ''
66
setHeader(event, 'Content-Type', 'text/plain')
77

88
const data = await useStorage().getItem(`build:content:database.compressed.mjs`) || ''

0 commit comments

Comments
 (0)