forked from MapComplete/MapComplete
Fixes to contribution panel
This commit is contained in:
parent
6763c682ab
commit
f837d60756
3 changed files with 8 additions and 4 deletions
|
@ -30,7 +30,7 @@ export default class AttributionPanel extends Combine {
|
|||
"<br/>",
|
||||
|
||||
new VariableUiElement(contributions.map(contributions => {
|
||||
const sorted = Array.from(contributions, ([name, value]) => ({name, value}));
|
||||
const sorted = Array.from(contributions, ([name, value]) => ({name, value})).filter(x => x.name !== undefined && x.name !== "undefined");
|
||||
if (sorted.length === 0) {
|
||||
return "";
|
||||
}
|
||||
|
@ -77,6 +77,10 @@ export default class AttributionPanel extends Combine {
|
|||
let contribsStr = filtered.map(c => c.contributor)
|
||||
.join(", ")
|
||||
|
||||
if(contribsStr === ""){
|
||||
// Hmm, something went wrong loading the contributors list. Lets show nothing
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return Translations.t.general.attribution.codeContributionsBy.Subs({
|
||||
contributors: contribsStr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue