diff --git a/components/x-live-blog-post/src/LiveBlogPost.jsx b/components/x-live-blog-post/src/LiveBlogPost.jsx index 73b402136..6eb960f77 100644 --- a/components/x-live-blog-post/src/LiveBlogPost.jsx +++ b/components/x-live-blog-post/src/LiveBlogPost.jsx @@ -70,7 +70,7 @@ const LiveBlogPost = ({ /> ) } - if (typeof byline === 'object' && 'tree' in byline) { + if (byline && typeof byline === 'object' && 'tree' in byline) { postByline = (
structured live blog body
') }) + + it('handles posts without bylines', () => { + const postWithoutByline = { ...regularPostContentPipeline, byline: null } + const liveBlogPost = mount(structured live blog body
') + }) }) it('adds a data-x-component attribute', () => {