Fix issue where duplicate expanded community entries could appear (close #6422)

This commit is contained in:
Quincy Morgan
2019-05-23 17:02:15 -04:00
parent 9d5783d507
commit ca19d50558
+6 -3
View File
@@ -281,19 +281,22 @@ export function uiSuccess(context) {
function showMore(selection) {
var more = selection
var more = selection.selectAll('.community-more')
.data([0]);
var moreEnter = more.enter()
.append('div')
.attr('class', 'community-more');
if (d.extendedDescription) {
more
moreEnter
.append('div')
.attr('class', 'community-extended-description')
.html(t('community.' + d.id + '.extendedDescription', replacements));
}
if (d.languageCodes && d.languageCodes.length) {
more
moreEnter
.append('div')
.attr('class', 'community-languages')
.text(t('success.languages', { languages: d.languageCodes.join(', ') }));