Select default_plate image when no food image uploaded

This commit is contained in:
Sanjit Joseph 2022-11-23 17:20:55 -08:00
parent e6ac5ea33d
commit 0b7e101bb2
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ class ReviewCard extends HTMLElement {
mealImg.setAttribute("alt","Meal Photo Corrupted");
mealImg.setAttribute("src",data["mealImg"]);
mealImg.addEventListener("error", function(e) {
mealImg.setAttribute("src", "./assets/images/plate_with_cutlery.png");
mealImg.setAttribute("src", "./assets/images/default_plate.png");
e.onerror = null;
});

View File

@ -18,7 +18,7 @@ function setupInfo(){
let mealImg = document.getElementById("d-mealImg");
mealImg.setAttribute("src",currReview["mealImg"]);
mealImg.addEventListener("error", function(e) {
mealImg.setAttribute("src", "./assets/images/plate_with_cutlery.png");
mealImg.setAttribute("src", "./assets/images/default_plate.png");
e.onerror = null;
});