mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 18:56:57 +02:00
dont call marked if content is empty in get_teaser
This commit is contained in:
@@ -271,8 +271,11 @@ marked.setOptions({
|
||||
'pid:' + pid + ':uid'
|
||||
], function(err, content) {
|
||||
user.getUserField(content[1], 'username', function(username) {
|
||||
var stripped = content[0];
|
||||
if(content[0])
|
||||
stripped = utils.strip_tags(marked(content[0]));
|
||||
callback({
|
||||
"text": utils.strip_tags(marked(content[0])),
|
||||
"text": stripped,
|
||||
"username": username
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user