Skip to content

Commit

Permalink
fix(Subtitle): crash on unattached docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kripod authored Dec 8, 2023
1 parent 617163f commit 2f26beb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/ui/blocks/src/blocks/Subtitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ interface SubtitleProps {

export const Subtitle: FunctionComponent<SubtitleProps> = ({ children }) => {
const docsContext = useContext(DocsContext);
const { parameters } = docsContext.storyById();
const content = children || parameters?.componentSubtitle;
const content =
children || docsContext.storyById().parameters?.componentSubtitle;

return content ? (
<PureSubtitle className="sbdocs-subtitle sb-unstyled">{content}</PureSubtitle>
Expand Down

0 comments on commit 2f26beb

Please sign in to comment.