Skip to content

Commit 600e97c

Browse files
authored
study viewer check for data before running parse replace (#1387)
1 parent cc49fac commit 600e97c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/StudyViewer/StudyDetails.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class StudyDetails extends React.Component {
405405
<div className='h3-typo'>{this.getLabel(k)}</div>
406406
<Paragraph>
407407
{/* strips out all html tags except br, strong, table, tr, td, th */}
408-
{parse(v.replace(/(<(?!(br\/?>)|(\/?strong>)|(\/?table.*>)|(\/?tr>)|(\/?td>|(\/?th>)))[^>]+>)/ig, ''))}
408+
{v && parse(v.replace(/(<(?!(br\/?>)|(\/?strong>)|(\/?table.*>)|(\/?tr>)|(\/?td>|(\/?th>)))[^>]+>)/ig, ''))}
409409
</Paragraph>
410410
</div>
411411
)))}

0 commit comments

Comments
 (0)