forked from MapComplete/MapComplete
		
	Stabilize code contributor count
This commit is contained in:
		
							parent
							
								
									322a282ad5
								
							
						
					
					
						commit
						ab0d510cdd
					
				
					 1 changed files with 9 additions and 7 deletions
				
			
		|  | @ -30,7 +30,10 @@ export default class AttributionPanel extends Combine { | ||||||
|             "<br/>", |             "<br/>", | ||||||
| 
 | 
 | ||||||
|             new VariableUiElement(contributions.map(contributions => { |             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) { |                 if (sorted.length === 0) { | ||||||
|                     return ""; |                     return ""; | ||||||
|                 } |                 } | ||||||
|  | @ -69,12 +72,11 @@ export default class AttributionPanel extends Combine { | ||||||
|     private static CodeContributors(): BaseUIElement { |     private static CodeContributors(): BaseUIElement { | ||||||
| 
 | 
 | ||||||
|         const total = contributors.contributors.length; |         const total = contributors.contributors.length; | ||||||
|         let filtered = contributors.contributors |         let filtered = [...contributors.contributors] | ||||||
| 
 | 
 | ||||||
|         filtered.splice(10, total - 10); |         filtered.splice(10, total - 10); | ||||||
| 
 | 
 | ||||||
|         let contribsStr = filtered.map(c => c.contributor) |         let contribsStr = filtered.map(c => c.contributor).join(", ") | ||||||
|             .join(", ") |  | ||||||
| 
 | 
 | ||||||
|         if (contribsStr === "") { |         if (contribsStr === "") { | ||||||
|             // Hmm, something went wrong loading the contributors list. Lets show nothing
 |             // Hmm, something went wrong loading the contributors list. Lets show nothing
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue