Skip to content

Commit

Permalink
fix: fix document undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Jan 25, 2024
1 parent 29d6fac commit 2ec1fff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/karbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@
"access": "public"
},
"gitHead": "8df1f4d5837a7e2ddbff6cc79f5fec256c34a394"
}
}
4 changes: 2 additions & 2 deletions packages/karbon/src/runtime/api/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ export async function getArticle(id: string) {
}

if (process.env.NODE_ENV === 'development') {
const { success } = QueryArticleSchema.safeParse(document)
const { success } = QueryArticleSchema.safeParse(data.article)
if (!success) {
console.error(new Error(`Invalid article: ${JSON.stringify(document)}`))
console.error(new Error(`Invalid article: ${JSON.stringify(data.article)}`))
}
}
const res = await encryptArticle(normalizeArticle(data.article))
Expand Down

0 comments on commit 2ec1fff

Please sign in to comment.