mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 00:35:50 +00:00
FEATURE: allow for for empty description in list
This commit is contained in:
parent
c99f4260c0
commit
31a81d4eee
@ -26,7 +26,11 @@ createWidget('small-user-list', {
|
|||||||
users = users.concat(avatarAtts(currentUser));
|
users = users.concat(avatarAtts(currentUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
let description = I18n.t(atts.description, { icons: '' });
|
let description = null;
|
||||||
|
|
||||||
|
if (atts.description) {
|
||||||
|
description = I18n.t(atts.description, { icons: '' });
|
||||||
|
}
|
||||||
|
|
||||||
// oddly post_url is on the user
|
// oddly post_url is on the user
|
||||||
let postUrl;
|
let postUrl;
|
||||||
@ -38,7 +42,13 @@ createWidget('small-user-list', {
|
|||||||
if (postUrl) {
|
if (postUrl) {
|
||||||
description = h('a', { attributes: { href: Discourse.getURL(postUrl) } }, description);
|
description = h('a', { attributes: { href: Discourse.getURL(postUrl) } }, description);
|
||||||
}
|
}
|
||||||
return [icons, description, '.'];
|
|
||||||
|
let buffer = [icons];
|
||||||
|
if (description) {
|
||||||
|
buffer.push(description);
|
||||||
|
buffer.push(".");
|
||||||
|
}
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user