Check whether profile image exists before attempting to display it

master
Dessa Simpson 2020-08-12 12:43:30 -07:00
parent b586262905
commit 9b8fae4278
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ function buildTable(requests,allRequests) {
for (request of requests) {
console.log(request);
requestsDivHTML += `<tr><td class="request-url"><a href="${request.url}" target="_blank">${request.url}</a></td>\
<td class="request-requester"><img src="${request.imageurl}" class="table-userpic"/>${request.requester}</td>\
<td class="request-requester">${request.imageurl ? `<img src="${request.imageurl}" class="table-userpic"/>` : ''}${request.requester}</td>\
<td class="request-score">${request.score}</td>`;
if (allRequests) requestsDivHTML += `<td class="request-state">${request.state}</td>`;
if (window.loggedIn) {