This commit is contained in:
Hongbo Wu
2024-04-26 11:24:07 +08:00
parent 6493b8e2f6
commit 364f8f102f

View File

@ -583,11 +583,11 @@ export const functionResolvers = {
ctx: WithDataSourcesContext
) {
// convert html to the requested format if requested
if (item.format && item.content) {
if (item.format && item.format !== ArticleFormat.Html && item.content) {
let highlights: HighlightEntity[] = []
// load highlights if needed
if (
item.format === 'highlightedMarkdown' &&
item.format === ArticleFormat.HighlightedMarkdown &&
item.highlightAnnotations?.length
) {
highlights = await ctx.dataLoaders.highlights.load(item.id)