Skip to content

Commit

Permalink
fix: avoid blank blogs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jun 27, 2022
1 parent ed5d3db commit a1bea0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/StaticMarkdownRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const CacheHTMLDirective: Directive<any, string> = {
created(el, binding) {
if (cache[binding.value]) {
el.innerHTML = cache[binding.value]
} else if (el.innerHTML) {
} else if (el.innerHTML && el.innerHTML !== '<!---->') {
cache[binding.value] = el.innerHTML
}
},
Expand Down Expand Up @@ -34,7 +34,7 @@ export default defineComponent({
createElementBlock(
'div',
process.client && shouldSkipRender()
? { innerHTML: cache[key] || '<!-- -->' }
? { innerHTML: cache[key] || '<!---->' }
: null,
process.client && shouldSkipRender()
? []
Expand Down

1 comment on commit a1bea0b

@vercel
Copy link

@vercel vercel bot commented on a1bea0b Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.