forked from newthuhole/hole_thu_frontend
Update Common.js
This commit is contained in:
@@ -136,14 +136,14 @@ export class HighlightedMarkdown extends Component {
|
||||
return (
|
||||
<>
|
||||
{props.author}
|
||||
{parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions)}
|
||||
{parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions) || ''}
|
||||
</>
|
||||
)
|
||||
} else {
|
||||
let rawMd = props.text
|
||||
if (props.author) rawMd = props.author + ' ' + rawMd
|
||||
const renderedMarkdown = renderMd(rawMd)
|
||||
return parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions)
|
||||
return (parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions) || null)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,4 +307,4 @@ export class ClickHandler extends PureComponent {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user