Display submitter name in admin panel for games submitted without account
This commit is contained in:
		
							parent
							
								
									cd1f17803b
								
							
						
					
					
						commit
						119aae76e5
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -291,8 +291,13 @@ CATEGORIES.push(new Category(
 | 
			
		|||
        row.appendChild(dateCell);
 | 
			
		||||
 | 
			
		||||
        const submitterCell = document.createElement('td');
 | 
			
		||||
        Data.getAccount(game.submitterID)
 | 
			
		||||
            .then(data => submitterCell.textContent = data.name);
 | 
			
		||||
        if(game.submitterID) {
 | 
			
		||||
            Data.getAccount(game.submitterID)
 | 
			
		||||
                .then(data => submitterCell.textContent = data.name);
 | 
			
		||||
        } else {
 | 
			
		||||
            submitterCell.textContent = game.submitterName;
 | 
			
		||||
            console.log(game.submitterName);
 | 
			
		||||
        }
 | 
			
		||||
        row.appendChild(submitterCell);
 | 
			
		||||
    },
 | 
			
		||||
    async function addGame() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue