diff --git a/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js b/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js index 0c6a7fff..c19312c9 100644 --- a/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js +++ b/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js @@ -35,7 +35,9 @@ class TimelineFeed extends Component { componentDidUpdate(prevProps) { const { timeline } = this.props; - if (!_.isEqual(prevProps.timeline, timeline) && timeline?.hits?.total > 0) { + const hasComments = timeline?.hits?.total > 0; + const hasNewComments = prevProps.timeline?.hits?.total !== timeline?.hits?.total; + if (hasComments && hasNewComments) { window.MathJax?.typeset(); } }