Commit e608fd3d authored by konrad-ivelic's avatar konrad-ivelic
Browse files

Update gallery.js

Corrected small code smells on gallery.js
parent 4cf83374
Pipeline #172051 passed with stages
in 1 minute and 55 seconds
let goBackButton;
let submitNewFileButton;
async function retrieveWorkoutImages(id) {
let workoutData = null;
......@@ -18,7 +17,7 @@ async function retrieveWorkoutImages(id) {
"workout-owner"
).innerHTML = `Owner: ${workoutData["owner_username"]}`;
let hasNoImages = workoutData.files.length == 0;
let hasNoImages = workoutData.files.length === 0;
let noImageText = document.querySelector("#no-images-text");
if (hasNoImages) {
......@@ -133,7 +132,7 @@ async function handleDeleteImgClick(
host_variable,
acceptedFileTypes
) {
if (validateImgFileType(id, host_variable, acceptedFileTypes)) {
if (await validateImgFileType(id, host_variable, acceptedFileTypes)) {
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment