Skip to content

Commit

Permalink
Prevent crash when latex is used (#6064)
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum committed Mar 19, 2022
1 parent 87d37a4 commit ea4c74a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 92 deletions.
3 changes: 2 additions & 1 deletion app/components/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default class Markdown extends PureComponent {
channelLink: this.renderChannelLink,
emoji: this.renderEmoji,
hashtag: this.renderHashtag,
latexinline: this.renderParagraph,

paragraph: this.renderParagraph,
heading: this.renderHeading,
Expand Down Expand Up @@ -146,7 +147,7 @@ export default class Markdown extends PureComponent {
if (node.type === 'image') {
extraProps.reactChildren = node.react.children;
extraProps.linkDestination = node.linkDestination;
extraProps.size = node.size;
extraProps.size = (typeof node.size === 'object') ? node.size : undefined;
}

return extraProps;
Expand Down
Loading

0 comments on commit ea4c74a

Please sign in to comment.