Skip to content

Commit

Permalink
fix: meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes committed Feb 25, 2023
1 parent e486853 commit 157616e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/transformers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function transformContent (id: string, content: string, meta: Stora
}, Promise.resolve(parsed))

// Add meta
if (meta.mtime) {
if (meta && meta.mtime) {
result._updatedAt = meta.mtime.toISOString()
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/basic/server/api/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default eventHandler(async (event) => {
const { id, content, options } = await readBody(event)

// @ts-ignore
const parsedContent = await parseContent(id, content, options)
const parsedContent = await parseContent(id, content, {}, options)

return parsedContent
})

0 comments on commit 157616e

Please sign in to comment.