diff --git a/UI/BigComponents/AttributionPanel.ts b/UI/BigComponents/AttributionPanel.ts index b817ce440..8b68a868d 100644 --- a/UI/BigComponents/AttributionPanel.ts +++ b/UI/BigComponents/AttributionPanel.ts @@ -30,7 +30,10 @@ export default class AttributionPanel extends Combine { "
", new VariableUiElement(contributions.map(contributions => { - const sorted = Array.from(contributions, ([name, value]) => ({name, value})).filter(x => x.name !== undefined && x.name !== "undefined"); + const sorted = Array.from(contributions, ([name, value]) => ({ + name, + value + })).filter(x => x.name !== undefined && x.name !== "undefined"); if (sorted.length === 0) { return ""; } @@ -69,14 +72,13 @@ export default class AttributionPanel extends Combine { private static CodeContributors(): BaseUIElement { const total = contributors.contributors.length; - let filtered = contributors.contributors - - filtered.splice(10, total - 10); + let filtered = [...contributors.contributors] - let contribsStr = filtered.map(c => c.contributor) - .join(", ") + filtered.splice(10, total - 10); - if(contribsStr === ""){ + let contribsStr = filtered.map(c => c.contributor).join(", ") + + if (contribsStr === "") { // Hmm, something went wrong loading the contributors list. Lets show nothing return undefined; }