Skip to content

Commit b4fdb5e

Browse files
committed
chore: broken test
1 parent 05b16f5 commit b4fdb5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/server/og-image/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export async function resolveContext(e: H3Event): Promise<H3Error | OgImageRende
9191
.replace(`/__og-image__/static`, '')
9292
.replace(`/og.${extension}`, ''),
9393
)
94-
if (queryParams._query)
95-
basePath = withQuery(basePath, JSON.parse(queryParams._query))
94+
if (queryParams._query && typeof queryParams._query === 'object')
95+
basePath = withQuery(basePath, queryParams._query)
9696
const isDebugJsonPayload = extension === 'json' && runtimeConfig.debug
9797
const key = resolvePathCacheKey(e, basePath)
9898
let options: OgImageOptions | null | undefined = queryParams.options as OgImageOptions

0 commit comments

Comments
 (0)